fuck yea
This commit is contained in:
@@ -124,6 +124,17 @@ by the key 'from' and ends with the number defined in 'to'."
|
||||
(when (< from to)
|
||||
(pair from (range :from (+ 1 from) :to 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))
|
||||
(mutate from (incr from))
|
||||
(while (< from to)
|
||||
(prog
|
||||
(append result (copy from))
|
||||
(mutate from (incr from))))
|
||||
result)
|
||||
|
||||
(defun map (fun seq)
|
||||
"Takes a function and a sequence as arguments and returns a new
|
||||
sequence which contains the results of using the first sequences
|
||||
|
||||
Reference in New Issue
Block a user