fix range on list

master
Avril 5 years ago
parent a1773641ba
commit 70cd056fda
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -21,7 +21,8 @@
(defun %crandom-list (range &rest params) (defun %crandom-list (range &rest params)
(setf (car range) (apply 'crandom params)) (setf (car range) (apply 'crandom params))
(unless (null (cdr range)) (if (null (cdr range))
(cons (car range) nil)
(cons (car range) (apply '%crandom-list (cons (cdr range) params))))) (cons (car range) (apply '%crandom-list (cons (cdr range) params)))))
(defun crandom-range (range &rest params) (defun crandom-range (range &rest params)

@ -19,7 +19,8 @@
(defun %urandom-list (range &rest params) (defun %urandom-list (range &rest params)
(setf (car range) (apply 'urandom params)) (setf (car range) (apply 'urandom params))
(unless (null (cdr range)) (if (null (cdr range))
(cons (car range) nil)
(cons (car range) (apply '%urandom-list (cons (cdr range) params))))) (cons (car range) (apply '%urandom-list (cons (cdr range) params)))))
(defun urandom-range (range &rest params) (defun urandom-range (range &rest params)

Loading…
Cancel
Save