aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data/sum.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/data/sum.lux14
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index b90206fe7..7434d7509 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -19,23 +19,23 @@
(let [(^open "list/.") (list.equivalence text.equivalence)]
($_ _.and
(_.test "Can inject values into Either."
- (and (|> (/.left "Hello") (case> (0 "Hello") #1 _ #0))
- (|> (/.right "World") (case> (1 "World") #1 _ #0))))
+ (and (|> (/.left "Hello") (case> (0 #0 "Hello") #1 _ #0))
+ (|> (/.right "World") (case> (0 #1 "World") #1 _ #0))))
(_.test "Can discriminate eithers based on their cases."
(let [[_lefts _rights] (/.partition (: (List (| Text Text))
- (list (0 "0") (1 "1") (0 "2"))))]
+ (list (0 #0 "0") (0 #1 "1") (0 #0 "2"))))]
(and (list/= _lefts
(/.lefts (: (List (| Text Text))
- (list (0 "0") (1 "1") (0 "2")))))
+ (list (0 #0 "0") (0 #1 "1") (0 #0 "2")))))
(list/= _rights
(/.rights (: (List (| Text Text))
- (list (0 "0") (1 "1") (0 "2"))))))))
+ (list (0 #0 "0") (0 #1 "1") (0 #0 "2"))))))))
(_.test "Can apply a function to an Either value depending on the case."
(and (n.= 10 (/.either (function (_ _) 10)
(function (_ _) 20)
- (: (| Text Text) (0 ""))))
+ (: (| Text Text) (0 #0 ""))))
(n.= 20 (/.either (function (_ _) 10)
(function (_ _) 20)
- (: (| Text Text) (1 ""))))))
+ (: (| Text Text) (0 #1 ""))))))
))))