Add unit tests for lib.functions.range

This commit is contained in:
2025-02-21 13:58:58 +00:00
parent 53174000df
commit 4b4421c101
2 changed files with 10 additions and 1 deletions

View File

@@ -22,7 +22,7 @@
(fn range (start end &optional (step 1)) (-> (fixnum fixnum &optional fixnum) list)
"Make a list of numbers from START to END (exclusive). If STEP is given, then
each member is STEP distance apart."
(if (<= end start)
(if (< end start)
(error (format nil "~a < ~a" end start))
(loop :for i :from start :to (1- end) :by step
:collect i)))