aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation/lux.lux')
-rw-r--r--stdlib/source/documentation/lux.lux13
1 files changed, 6 insertions, 7 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux
index be907a73d..5dbef4fac 100644
--- a/stdlib/source/documentation/lux.lux
+++ b/stdlib/source/documentation/lux.lux
@@ -535,8 +535,8 @@
[(def: .public (range enum from to)
(All (_ a) (-> (Enum a) a a (List a)))
(let [(open "[0]") enum]
- (loop [end to
- output {.#End}]
+ (loop (again [end to
+ output {.#End}])
(cond (< end from)
(again (pred end) {.#Item end output})
@@ -679,15 +679,14 @@
(documentation: /.loop
(format "Allows arbitrary looping, using the 'again' form to re-start the loop."
\n "Can be used in monadic code to create monadic loops.")
- [(loop [count +0
- x init]
+ [(loop (again [count +0
+ x init])
(if (< +10 count)
(again (++ count) (f x))
x))]
["Loops can also be given custom names."
- (loop my_loop
- [count +0
- x init]
+ (loop (my_loop [count +0
+ x init])
(if (< +10 count)
(my_loop (++ count) (f x))
x))])