aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/product.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-08-11 02:38:59 -0400
committerEduardo Julian2021-08-11 02:38:59 -0400
commita62ce3f9c2b605e0033f4772b0f64c4525de4d86 (patch)
treeecbabe8f110d82b2e6481cf7c0532d4bd4386570 /stdlib/source/library/lux/data/product.lux
parent464b6e8f5e6c62f58fa8c7ff61ab2ad215e98bd1 (diff)
Relocated maybe and lazy from data to control.
Diffstat (limited to 'stdlib/source/library/lux/data/product.lux')
-rw-r--r--stdlib/source/library/lux/data/product.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/library/lux/data/product.lux b/stdlib/source/library/lux/data/product.lux
index 91358313b..4173f8133 100644
--- a/stdlib/source/library/lux/data/product.lux
+++ b/stdlib/source/library/lux/data/product.lux
@@ -8,7 +8,7 @@
(template [<name> <doc>]
[(def: .public (<name> pair)
- {#.doc (doc <doc>)}
+ {#.doc (example <doc>)}
(All [left right]
(-> [left right] <name>))
(let [[left right] pair]
@@ -19,16 +19,16 @@
)
... https://en.wikipedia.org/wiki/Currying
-(def: .public (curry f)
- {#.doc (doc "Converts a 2-argument function into nested single-argument functions.")}
+(def: .public (curried f)
+ {#.doc (example "Converts a 2-argument function into nested single-argument functions.")}
(All [a b c]
(-> (-> [a b] c)
(-> a b c)))
(function (_ x y)
(f [x y])))
-(def: .public (uncurry f)
- {#.doc (doc "Converts nested single-argument functions into a 2-argument function.")}
+(def: .public (uncurried f)
+ {#.doc (example "Converts nested single-argument functions into a 2-argument function.")}
(All [a b c]
(-> (-> a b c)
(-> [a b] c)))
@@ -36,13 +36,13 @@
(let [[x y] xy]
(f x y))))
-(def: .public (swap xy)
+(def: .public (swapped xy)
(All [a b] (-> [a b] [b a]))
(let [[x y] xy]
[y x]))
(def: .public (apply f g)
- {#.doc (doc "Apply functions to both sides of a pair.")}
+ {#.doc (example "Apply functions to both sides of a pair.")}
(All [a b c d]
(-> (-> a c) (-> b d)
(-> [a b] [c d])))
@@ -50,7 +50,7 @@
[(f x) (g y)]))
(def: .public (fork f g)
- {#.doc (doc "Yields a pair by applying both functions to a single value.")}
+ {#.doc (example "Yields a pair by applying both functions to a single value.")}
(All [a l r]
(-> (-> a l) (-> a r)
(-> a [l r])))