diff options
author | Eduardo Julian | 2021-08-27 20:59:34 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-27 20:59:34 -0400 |
commit | c5b61d2f46ac19bf511197f3a537c4be0f47df33 (patch) | |
tree | cd62d188403e9b3998ba293dc5308719a430f1fe /stdlib/source/library/lux/data/product.lux | |
parent | e814f667aed509a70bd386dcd54628929134def4 (diff) |
Updates to the Ruby compiler.
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 1e0bc9c96..3ad1ba207 100644 --- a/stdlib/source/library/lux/data/product.lux +++ b/stdlib/source/library/lux/data/product.lux @@ -7,7 +7,7 @@ (template [<name>] [(def: .public (<name> [left right]) - (All [left right] + (All (_ left right) (-> [left right] <name>)) <name>)] @@ -17,14 +17,14 @@ ... https://en.wikipedia.org/wiki/Currying (def: .public (curried f) - (All [a b c] + (All (_ a b c) (-> (-> [a b] c) (-> a b c))) (function (_ x y) (f [x y]))) (def: .public (uncurried f) - (All [a b c] + (All (_ a b c) (-> (-> a b c) (-> [a b] c))) (function (_ xy) @@ -32,32 +32,32 @@ (f x y)))) (def: .public (swapped [left right]) - (All [left right] (-> [left right] [right left])) + (All (_ left right) (-> [left right] [right left])) [right left]) (def: .public (then f g) - (All [a b c d] + (All (_ a b c d) (-> (-> a c) (-> b d) (-> [a b] [c d]))) (function (_ [x y]) [(f x) (g y)])) (def: .public (forked f g) - (All [a l r] + (All (_ a l r) (-> (-> a l) (-> a r) (-> a [l r]))) (function (_ x) [(f x) (g x)])) (implementation: .public (equivalence left right) - (All [l r] (-> (Equivalence l) (Equivalence r) (Equivalence [l r]))) + (All (_ l r) (-> (Equivalence l) (Equivalence r) (Equivalence [l r]))) (def: (= [rl rr] [sl sr]) (and (\ left = rl sl) (\ right = rr sr)))) (def: .public (hash left right) - (All [l r] (-> (Hash l) (Hash r) (Hash [l r]))) + (All (_ l r) (-> (Hash l) (Hash r) (Hash [l r]))) (implementation (def: &equivalence (..equivalence (\ left &equivalence) |