diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/specification/lux/abstract/functor.lux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/specification/lux/abstract/functor.lux b/stdlib/source/specification/lux/abstract/functor.lux index d60555ae0..33c6506c5 100644 --- a/stdlib/source/specification/lux/abstract/functor.lux +++ b/stdlib/source/specification/lux/abstract/functor.lux @@ -25,32 +25,32 @@ (def: (identity injection comparison (^open "@//.")) (All [f] (-> (Injection f) (Comparison f) (Functor f) Test)) (do {! random.monad} - [sample (\ ! map injection random.nat)] + [sample (\ ! each injection random.nat)] (_.test "Identity." ((comparison n.=) - (@//map function.identity sample) + (@//each function.identity sample) sample)))) (def: (homomorphism injection comparison (^open "@//.")) (All [f] (-> (Injection f) (Comparison f) (Functor f) Test)) (do {! random.monad} [sample random.nat - increase (\ ! map n.+ random.nat)] + increase (\ ! each n.+ random.nat)] (_.test "Homomorphism." ((comparison n.=) - (@//map increase (injection sample)) + (@//each increase (injection sample)) (injection (increase sample)))))) (def: (composition injection comparison (^open "@//.")) (All [f] (-> (Injection f) (Comparison f) (Functor f) Test)) (do {! random.monad} - [sample (\ ! map injection random.nat) - increase (\ ! map n.+ random.nat) - decrease (\ ! map n.- random.nat)] + [sample (\ ! each injection random.nat) + increase (\ ! each n.+ random.nat) + decrease (\ ! each n.- random.nat)] (_.test "Composition." ((comparison n.=) - (|> sample (@//map increase) (@//map decrease)) - (|> sample (@//map (|>> increase decrease))))))) + (|> sample (@//each increase) (@//each decrease)) + (|> sample (@//each (|>> increase decrease))))))) (def: .public (spec injection comparison functor) (All [f] (-> (Injection f) (Comparison f) (Functor f) Test)) |