diff options
Diffstat (limited to 'stdlib/source/library/lux/data/product.lux')
-rw-r--r-- | stdlib/source/library/lux/data/product.lux | 16 |
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]))) |