diff options
Diffstat (limited to 'stdlib/source/test/lux/abstract')
-rw-r--r-- | stdlib/source/test/lux/abstract/apply.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/abstract/codec.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/abstract/enum.lux | 14 | ||||
-rw-r--r-- | stdlib/source/test/lux/abstract/mix.lux (renamed from stdlib/source/test/lux/abstract/fold.lux) | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/abstract/monad.lux | 16 | ||||
-rw-r--r-- | stdlib/source/test/lux/abstract/monoid.lux | 4 |
6 files changed, 26 insertions, 26 deletions
diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux index fcdf5d793..75da1dc47 100644 --- a/stdlib/source/test/lux/abstract/apply.lux +++ b/stdlib/source/test/lux/abstract/apply.lux @@ -25,9 +25,9 @@ ($_ _.and (_.cover [/.composite] (let [expected (n.+ left right)] - (case (\ (/.composite maybe.monad maybe.apply list.apply) apply - (#.Some (list (n.+ left))) - (#.Some (list right))) + (case (\ (/.composite maybe.monad maybe.apply list.apply) on + (#.Some (list right)) + (#.Some (list (n.+ left)))) (^ (#.Some (list actual))) (n.= expected actual) diff --git a/stdlib/source/test/lux/abstract/codec.lux b/stdlib/source/test/lux/abstract/codec.lux index e3fd09626..32668c30f 100644 --- a/stdlib/source/test/lux/abstract/codec.lux +++ b/stdlib/source/test/lux/abstract/codec.lux @@ -21,12 +21,12 @@ (Codec JSON Bit) (let [field "value"] (implementation - (def: encode + (def: encoded (|>> #json.Boolean [field] list json.object)) - (def: decode + (def: decoded (json.boolean_field field))))) (def: codec @@ -39,7 +39,7 @@ [expected random.bit] (<| (_.covering /._) (_.cover [/.composite] - (case (|> expected (\ ..codec encode) (\ ..codec decode)) + (case (|> expected (\ ..codec encoded) (\ ..codec decoded)) (#try.Success actual) (bit\= expected actual) diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux index 179dad8df..33dff9472 100644 --- a/stdlib/source/test/lux/abstract/enum.lux +++ b/stdlib/source/test/lux/abstract/enum.lux @@ -9,7 +9,7 @@ [data ["." product] [collection - ["." list ("#\." fold)]]] + ["." list ("#\." mix)]]] [math ["." random (#+ Random)] [number @@ -39,12 +39,12 @@ (list.reversed (/.range n.enum end start))) every_element_is_a_successor? (case range (#.Item head tail) - (|> (list\fold (function (_ next [verdict prev]) - [(and verdict - (n.= next (\ n.enum succ prev))) - next]) - [true head] - tail) + (|> (list\mix (function (_ next [verdict prev]) + [(and verdict + (n.= next (\ n.enum succ prev))) + next]) + [true head] + tail) product.left) #.End diff --git a/stdlib/source/test/lux/abstract/fold.lux b/stdlib/source/test/lux/abstract/mix.lux index 1dbf9eec8..5aac1fd2b 100644 --- a/stdlib/source/test/lux/abstract/fold.lux +++ b/stdlib/source/test/lux/abstract/mix.lux @@ -12,7 +12,7 @@ [number ["n" nat]]]]] [\\library - ["." / (#+ Fold)]]) + ["." / (#+ Mix)]]) (def: .public test Test @@ -21,6 +21,6 @@ (<| (_.covering /._) ($_ _.and (_.cover [/.with_monoid] - (n.= (\ list.fold fold (\ n.addition compose) (\ n.addition identity) samples) - (/.with_monoid n.addition list.fold samples))) + (n.= (\ list.mix mix (\ n.addition compose) (\ n.addition identity) samples) + (/.with_monoid n.addition list.mix samples))) )))) diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux index 051f63a5c..5ede269ef 100644 --- a/stdlib/source/test/lux/abstract/monad.lux +++ b/stdlib/source/test/lux/abstract/monad.lux @@ -5,7 +5,7 @@ [data ["." identity (#+ Identity)] [collection - ["." list ("#\." functor fold)]]] + ["." list ("#\." functor mix)]]] [math ["." random] [number @@ -52,13 +52,13 @@ (|> poly (/.only identity.monad (|>> n.even? (\ identity.monad in))) (: (Identity (List Nat)))))) - (_.cover [/.fold] - (n.= (list\fold n.+ 0 poly) + (_.cover [/.mix] + (n.= (list\mix n.+ 0 poly) (|> poly - (/.fold identity.monad - (function (_ part whole) - (\ identity.monad in - (n.+ part whole))) - 0) + (/.mix identity.monad + (function (_ part whole) + (\ identity.monad in + (n.+ part whole))) + 0) (: (Identity Nat))))) )))) diff --git a/stdlib/source/test/lux/abstract/monoid.lux b/stdlib/source/test/lux/abstract/monoid.lux index 75eee67c6..c78d2d8f6 100644 --- a/stdlib/source/test/lux/abstract/monoid.lux +++ b/stdlib/source/test/lux/abstract/monoid.lux @@ -23,8 +23,8 @@ intR random.int] (<| (_.covering /._) ($_ _.and - (_.cover [/.composite] - (let [[natLR intLR] (\ (/.composite nat.addition int.multiplication) compose + (_.cover [/.and] + (let [[natLR intLR] (\ (/.and nat.addition int.multiplication) compose [natL intL] [natR intR])] (and (nat.= (\ nat.addition compose natL natR) natLR) |