diff options
Diffstat (limited to 'stdlib/source/test/lux/control/apply.lux')
-rw-r--r-- | stdlib/source/test/lux/control/apply.lux | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/stdlib/source/test/lux/control/apply.lux b/stdlib/source/test/lux/control/apply.lux index 42d2fa8b9..1cd756509 100644 --- a/stdlib/source/test/lux/control/apply.lux +++ b/stdlib/source/test/lux/control/apply.lux @@ -2,7 +2,9 @@ [lux #* [control [monad (#+ do)]] - data/text/format + [data + [text + format]] ["." function] [math ["r" random]] @@ -12,36 +14,36 @@ [// [functor (#+ Injection Comparison)]]) -(def: (identity injection comparison (^open "_/.")) +(def: (identity injection comparison (^open "_;.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do r.monad [sample (:: @ map injection r.nat)] (_.test "Identity." ((comparison n/=) - (_/apply (injection function.identity) sample) + (_;apply (injection function.identity) sample) sample)))) -(def: (homomorphism injection comparison (^open "_/.")) +(def: (homomorphism injection comparison (^open "_;.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do r.monad [sample r.nat increase (:: @ map n/+ r.nat)] (_.test "Homomorphism." ((comparison n/=) - (_/apply (injection increase) (injection sample)) + (_;apply (injection increase) (injection sample)) (injection (increase sample)))))) -(def: (interchange injection comparison (^open "_/.")) +(def: (interchange injection comparison (^open "_;.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do r.monad [sample r.nat increase (:: @ map n/+ r.nat)] (_.test "Interchange." ((comparison n/=) - (_/apply (injection increase) (injection sample)) - (_/apply (injection (function (_ f) (f sample))) (injection increase)))))) + (_;apply (injection increase) (injection sample)) + (_;apply (injection (function (_ f) (f sample))) (injection increase)))))) -(def: (composition injection comparison (^open "_/.")) +(def: (composition injection comparison (^open "_;.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do r.monad [sample r.nat @@ -49,12 +51,12 @@ decrease (:: @ map n/- r.nat)] (_.test "Composition." ((comparison n/=) - (_$ _/apply + (_$ _;apply (injection function.compose) (injection increase) (injection decrease) (injection sample)) - ($_ _/apply + ($_ _;apply (injection increase) (injection decrease) (injection sample)))))) |