diff options
author | Eduardo Julian | 2021-07-28 04:48:42 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-28 04:48:42 -0400 |
commit | 5d4583aebd00adced10275b32ff1a93ab418be50 (patch) | |
tree | 89315e104e2b0ddd6d56f894f01a0575d3078699 /stdlib/source/library/lux/data/sum.lux | |
parent | 061fd8a209bbcaffc2bfb850ac6046752a567d50 (diff) |
Re-named List's tags: Nil => End && Cons => Item
Diffstat (limited to 'stdlib/source/library/lux/data/sum.lux')
-rw-r--r-- | stdlib/source/library/lux/data/sum.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/data/sum.lux b/stdlib/source/library/lux/data/sum.lux index 7a439fc54..2f0fddee9 100644 --- a/stdlib/source/library/lux/data/sum.lux +++ b/stdlib/source/library/lux/data/sum.lux @@ -36,13 +36,13 @@ [(def: #export (<name> es) (All [a b] (-> (List (| a b)) (List <side>))) (case es - #.Nil - #.Nil + #.End + #.End - (#.Cons (0 <right?> x) es') - (#.Cons [x (<name> es')]) + (#.Item (0 <right?> x) es') + (#.Item [x (<name> es')]) - (#.Cons _ es') + (#.Item _ es') (<name> es')))] [lefts a #0] @@ -52,14 +52,14 @@ (def: #export (partition xs) (All [a b] (-> (List (| a b)) [(List a) (List b)])) (case xs - #.Nil - [#.Nil #.Nil] + #.End + [#.End #.End] - (#.Cons x xs') + (#.Item x xs') (let [[lefts rights] (partition xs')] (case x - (0 #0 x') [(#.Cons x' lefts) rights] - (0 #1 x') [lefts (#.Cons x' rights)])))) + (0 #0 x') [(#.Item x' lefts) rights] + (0 #1 x') [lefts (#.Item x' rights)])))) (def: #export (equivalence left right) (All [l r] (-> (Equivalence l) (Equivalence r) (Equivalence (| l r)))) |