Hacker News new | ask | show | jobs
by Hexstream 6409 days 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...