Plaster
New
List
Login
common-lisp
default
anonymous
2021.04.11 01:23:58
LFC> (defun seq (start end) (loop with step = (signum (- end start)) for x = start then (incf x step) collect x until (= x end))) SEQ LFC> (seq 1 10) (1 2 3 4 5 6 7 8 9 10) LFC> (seq 10 1) (10 9 8 7 6 5 4 3 2 1)
Raw
Annotate
Repaste
Edit