From 4b4421c101a269051e53d76313d5035d27b4b074 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 21 Feb 2025 13:58:58 +0000 Subject: Add unit tests for lib.functions.range --- lib/functions.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/functions.lisp') diff --git a/lib/functions.lisp b/lib/functions.lisp index 2a7f4ab..40e940a 100644 --- a/lib/functions.lisp +++ b/lib/functions.lisp @@ -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))) -- cgit v1.2.3-13-gbd6f