News for hackers. Stuff that matters.
Re:My Job Interview at Google by Hexstream on Monday November 24, 2008 @05:14PM (#375503)
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...

There are no comments on this comment yet.