aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/abstract/monad.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/abstract/monad.lux14
1 files changed, 8 insertions, 6 deletions
diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux
index c420d6416..ecb292afb 100644
--- a/stdlib/source/test/lux/abstract/monad.lux
+++ b/stdlib/source/test/lux/abstract/monad.lux
@@ -1,6 +1,8 @@
(.module:
[lux #*
[data
+ [number
+ ["n" nat]]
[text
["%" format (#+ format)]]]
[control
@@ -18,10 +20,10 @@
(do r.monad
[sample r.nat
morphism (:: @ map (function (_ diff)
- (|>> (n/+ diff) _;wrap))
+ (|>> (n.+ diff) _;wrap))
r.nat)]
(_.test "Left identity."
- ((comparison n/=)
+ ((comparison n.=)
(|> (injection sample) (_;map morphism) _;join)
(morphism sample)))))
@@ -30,7 +32,7 @@
(do r.monad
[sample r.nat]
(_.test "Right identity."
- ((comparison n/=)
+ ((comparison n.=)
(|> (injection sample) (_;map _;wrap) _;join)
(injection sample)))))
@@ -39,13 +41,13 @@
(do r.monad
[sample r.nat
increase (:: @ map (function (_ diff)
- (|>> (n/+ diff) _;wrap))
+ (|>> (n.+ diff) _;wrap))
r.nat)
decrease (:: @ map (function (_ diff)
- (|>> (n/- diff) _;wrap))
+ (|>> (n.- diff) _;wrap))
r.nat)]
(_.test "Associativity."
- ((comparison n/=)
+ ((comparison n.=)
(|> (injection sample) (_;map increase) _;join (_;map decrease) _;join)
(|> (injection sample) (_;map (|>> increase (_;map decrease) _;join)) _;join)))))