aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/function/mixin.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/function/mixin.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux
index fa1c245a3..4fc898500 100644
--- a/stdlib/source/test/lux/control/function/mixin.lux
+++ b/stdlib/source/test/lux/control/function/mixin.lux
@@ -36,7 +36,7 @@
generator (: (Random (/.Mixin Nat Nat))
(do !
[output random.nat]
- (in (function (_ delegate recur input)
+ (in (function (_ delegate again input)
output))))
expected (|> (list.indices input)
(list#each ++)
@@ -49,27 +49,27 @@
(_.cover [/.fixed]
(let [factorial (/.fixed
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(case input
(^or 0 1) 1
- _ (n.* input (recur (-- input))))))]
+ _ (n.* input (again (-- input))))))]
(n.= expected
(factorial input))))
(_.cover [/.mixed]
(let [bottom (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(case input
(^or 0 1) 1
_ (delegate input))))
multiplication (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
- (n.* input (recur (-- input)))))
+ (function (_ delegate again input)
+ (n.* input (again (-- input)))))
factorial (/.fixed (/.mixed bottom multiplication))]
(n.= expected
(factorial input))))
(_.cover [/.nothing]
(let [loop (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(case input
(^or 0 1) 1
_ (n.* input (delegate (-- input))))))
@@ -81,7 +81,7 @@
(right input)))))
(_.cover [/.advice]
(let [bottom (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
+ (function (_ delegate again input)
1))
bottom? (: (Predicate Nat)
(function (_ input)
@@ -89,8 +89,8 @@
(^or 0 1) true
_ false)))
multiplication (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
- (n.* input (recur (-- input)))))
+ (function (_ delegate again input)
+ (n.* input (again (-- input)))))
factorial (/.fixed (/.mixed (/.advice bottom? bottom)
multiplication))]
(n.= expected
@@ -101,7 +101,7 @@
(function (_ state)
[shift []])))
meld (: (/.Mixin Nat (State Nat Nat))
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(function (_ state)
[state (n.+ state input)])))
function (/.fixed (/.mixed (/.before state.monad implant)
@@ -114,7 +114,7 @@
(function (_ state)
[shift []])))
meld (: (/.Mixin Nat (State Nat Nat))
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(function (_ state)
[state (n.+ state input)])))
function (/.fixed (/.mixed (/.after state.monad implant)
@@ -126,10 +126,10 @@
(_.cover [/.of_recursive]
(let [factorial (/.fixed
(/.of_recursive
- (function (_ recur input)
+ (function (_ again input)
(case input
(^or 0 1) 1
- _ (n.* input (recur (-- input)))))))]
+ _ (n.* input (again (-- input)))))))]
(n.= expected
(factorial input)))))
)))