diff options
Diffstat (limited to 'stdlib/source/test/lux/abstract/apply.lux')
-rw-r--r-- | stdlib/source/test/lux/abstract/apply.lux | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux index b2d67d3e9..87c706f55 100644 --- a/stdlib/source/test/lux/abstract/apply.lux +++ b/stdlib/source/test/lux/abstract/apply.lux @@ -2,6 +2,8 @@ [lux #* [abstract/monad (#+ do)] [data + [number + ["n" nat]] [text ["%" format (#+ format)]]] [control @@ -19,7 +21,7 @@ (do r.monad [sample (:: @ map injection r.nat)] (_.test "Identity." - ((comparison n/=) + ((comparison n.=) (_;apply (injection function.identity) sample) sample)))) @@ -27,9 +29,9 @@ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do r.monad [sample r.nat - increase (:: @ map n/+ r.nat)] + increase (:: @ map n.+ r.nat)] (_.test "Homomorphism." - ((comparison n/=) + ((comparison n.=) (_;apply (injection increase) (injection sample)) (injection (increase sample)))))) @@ -37,9 +39,9 @@ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do r.monad [sample r.nat - increase (:: @ map n/+ r.nat)] + increase (:: @ map n.+ r.nat)] (_.test "Interchange." - ((comparison n/=) + ((comparison n.=) (_;apply (injection increase) (injection sample)) (_;apply (injection (function (_ f) (f sample))) (injection increase)))))) @@ -47,10 +49,10 @@ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do r.monad [sample r.nat - increase (:: @ map n/+ r.nat) - decrease (:: @ map n/- r.nat)] + increase (:: @ map n.+ r.nat) + decrease (:: @ map n.- r.nat)] (_.test "Composition." - ((comparison n/=) + ((comparison n.=) (_$ _;apply (injection function.compose) (injection increase) |