3 ms·
Here's my shot at a solution: ;; * SPOILER? * (defun rand7 () (loop (let ((result (+ (1- (rand5)) (1- (rand5))))) (if (< result 7)
by Hexstream 18y ago
Here's my shot at a solution:
;; * SPOILER? *
(defun rand7 ()
(loop (let ((result (+ (1- (rand5))
(1- (rand5)))))
(if (< result 7)
(return (1+ result))))))
;; * SPOILER *
edit: If it doesn't work I'd like to know why...