13 lines
337 B
Turing
13 lines
337 B
Turing
(expect "do - simple example"
|
|
(equal (do ((n 1)) (t n)) 1))
|
|
|
|
(defun range (start end)
|
|
(do ((i (- end 1) (- i 1))
|
|
(lst (list) (cons i lst)))
|
|
((< i start) lst)))
|
|
|
|
(expect "do - range function"
|
|
(equal (let ((lst (range 1 4)))
|
|
(comment lst)
|
|
lst)
|
|
(list 1 2 3)))
|