aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/state.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/state.lux58
1 files changed, 29 insertions, 29 deletions
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index 40498c0d8..39e10983a 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -1,24 +1,24 @@
(.using
- [library
- [lux "*"
- ["_" test {"+" Test}]
- [abstract
- [monad {"+" do}]
- [\\specification
- ["$[0]" functor {"+" Injection Comparison}]
- ["$[0]" apply]
- ["$[0]" monad]]]
- [control
- [pipe {"+" let>}]
- ["[0]" io]]
- [data
- ["[0]" product]]
- [math
- ["[0]" random]
- [number
- ["n" nat]]]]]
- [\\library
- ["[0]" / {"+" State}]])
+ [library
+ [lux "*"
+ ["_" test {"+" Test}]
+ [abstract
+ [monad {"+" do}]
+ [\\specification
+ ["$[0]" functor {"+" Injection Comparison}]
+ ["$[0]" apply]
+ ["$[0]" monad]]]
+ [control
+ ["[0]" pipe]
+ ["[0]" io]]
+ [data
+ ["[0]" product]]
+ [math
+ ["[0]" random]
+ [number
+ ["n" nat]]]]]
+ [\\library
+ ["[0]" / {"+" State}]])
(def: (with_conditions [state output] computation)
(-> [Nat Nat] (State Nat Nat) Bit)
@@ -89,15 +89,15 @@
(_.cover [/.while /.result]
(|> (/.while condition (/.update ++))
(/.result 0)
- (let> [state' output']
- (n.= limit state'))))
+ (pipe.let [state' output']
+ (n.= limit state'))))
(_.cover [/.do_while]
(|> (/.do_while condition (/.update ++))
(/.result 0)
- (let> [state' output']
- (or (n.= limit state')
- (and (n.= 0 limit)
- (n.= 1 state'))))))
+ (pipe.let [state' output']
+ (or (n.= limit state')
+ (and (n.= 0 limit)
+ (n.= 1 state'))))))
)))
(def: monad_transformer
@@ -115,9 +115,9 @@
(in (n.+ a b))))
(/.result' state)
io.run!
- (let> [state' output']
- (and (n.= state state')
- (n.= (n.+ left right) output')))))
+ (pipe.let [state' output']
+ (and (n.= state state')
+ (n.= (n.+ left right) output')))))
)))
(def: .public test