aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/type/refinement.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/type/refinement.lux')
-rw-r--r--stdlib/source/test/lux/type/refinement.lux24
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/test/lux/type/refinement.lux b/stdlib/source/test/lux/type/refinement.lux
index 5942e2a84..6721399e7 100644
--- a/stdlib/source/test/lux/type/refinement.lux
+++ b/stdlib/source/test/lux/type/refinement.lux
@@ -29,10 +29,10 @@
(_.for [/.Refined])
(do {! random.monad}
[raw random.nat
- modulus (\ ! map (|>> (n.% 10) (n.+ 2)) random.nat)
+ modulus (\ ! each (|>> (n.% 10) (n.+ 2)) random.nat)
.let [predicate (: (Predicate Nat)
(|>> (n.% modulus) (n.= 0)))]
- total_raws (\ ! map (|>> (n.% 20) ++) random.nat)
+ total_raws (\ ! each (|>> (n.% 20) ++) random.nat)
raws (random.list total_raws random.nat)]
($_ _.and
(_.for [/.Refiner]
@@ -46,23 +46,23 @@
(not (predicate raw))))
(_.cover [/.predicate]
(|> (/.refiner predicate modulus)
- (maybe\map (|>> /.predicate (same? predicate)))
+ (maybe\each (|>> /.predicate (same? predicate)))
(maybe.else false)))
))
(_.cover [/.value]
(|> (/.refiner predicate modulus)
- (maybe\map (|>> /.value (n.= modulus)))
+ (maybe\each (|>> /.value (n.= modulus)))
(maybe.else false)))
(_.cover [/.lifted]
(and (|> (/.refiner predicate modulus)
- (maybe\map (/.lifted (n.+ modulus)))
- maybe\join
- (maybe\map (|>> /.value (n.= (n.+ modulus modulus))))
+ (maybe\each (/.lifted (n.+ modulus)))
+ maybe\conjoint
+ (maybe\each (|>> /.value (n.= (n.+ modulus modulus))))
(maybe.else false))
(|> (/.refiner predicate modulus)
- (maybe\map (/.lifted (n.+ (++ modulus))))
- maybe\join
- (maybe\map (|>> /.value (n.= (n.+ modulus (++ modulus)))))
+ (maybe\each (/.lifted (n.+ (++ modulus))))
+ maybe\conjoint
+ (maybe\each (|>> /.value (n.= (n.+ modulus (++ modulus)))))
(maybe.else false)
not)))
(_.cover [/.only]
@@ -72,7 +72,7 @@
(list.size actual))
(\ (list.equivalence n.equivalence) =
expected
- (list\map /.value actual)))))
+ (list\each /.value actual)))))
(_.cover [/.partition]
(let [expected (list.only predicate raws)
[actual alternative] (/.partition (/.refiner predicate) raws)]
@@ -82,7 +82,7 @@
(list.size alternative))
(\ (list.equivalence n.equivalence) =
expected
- (list\map /.value actual)))))
+ (list\each /.value actual)))))
(_.cover [/.type]
(exec (: (Maybe .._type)
(.._refiner raw))