Fixed not copying the default keyword args
This commit is contained in:
+4
-2
@@ -127,11 +127,13 @@ by the key 'from' and ends with the number defined in 'to'."
|
||||
(defun range-while (:keys from :defaults-to 0 to)
|
||||
"Returns a sequence of numbers starting with the number defined
|
||||
by the key 'from' and ends with the number defined in 'to'."
|
||||
(define result (list from))
|
||||
(define result (list (copy from)))
|
||||
(define head result)
|
||||
(mutate from (incr from))
|
||||
(while (< from to)
|
||||
(prog
|
||||
(append result (copy from))
|
||||
(mutate head (pair (first head) (pair (copy from) nil)))
|
||||
(define head (rest head))
|
||||
(mutate from (incr from))))
|
||||
result)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user