aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/function/memo.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/control/function/memo.lux')
-rw-r--r--stdlib/source/test/lux/control/function/memo.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux
index f975f5b97..e3188421d 100644
--- a/stdlib/source/test/lux/control/function/memo.lux
+++ b/stdlib/source/test/lux/control/function/memo.lux
@@ -6,12 +6,12 @@
[monad {"+" [do]}]]
[control
["[0]" io {"+" [IO]}]
- ["[0]" state {"+" [State]} ("[1]\[0]" monad)]]
+ ["[0]" state {"+" [State]} ("[1]#[0]" monad)]]
[data
["[0]" product]
[collection
["[0]" dictionary {"+" [Dictionary]}]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
["[0]" random]
[number
@@ -28,8 +28,8 @@
(def: (fibonacci recur input)
(/.Memo Nat Nat)
(case input
- 0 (state\in 0)
- 1 (state\in 1)
+ 0 (state#in 0)
+ 1 (state#in 1)
_ (do state.monad
[output_1 (recur (n.- 1 input))
output_2 (recur (n.- 2 input))]
@@ -58,7 +58,7 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [input (|> random.nat (\ ! each (|>> (n.% 5) (n.+ 21))))])
+ [input (|> random.nat (# ! each (|>> (n.% 5) (n.+ 21))))])
(_.for [/.Memo])
($_ _.and
(_.cover [/.closed /.none]
@@ -106,13 +106,13 @@
(: (//.Mixin Nat (State (Dictionary Nat Nat) Nat))
(function (factorial delegate recur input)
(case input
- (^or 0 1) (\ state.monad in 1)
+ (^or 0 1) (# state.monad in 1)
_ (do state.monad
[output' (recur (-- input))]
(in (n.* input output')))))))
expected (|> (list.indices input)
- (list\each ++)
- (list\mix n.* 1))
+ (list#each ++)
+ (list#mix n.* 1))
actual (|> (memo input)
(state.result (dictionary.empty n.hash))
product.right)]