(defun dice (x y) (let ((b '(0))) (dotimes (i y) (setq b (reduce (lambda (a b) (append a b)) (loop for n in (loop for i from 1 to x collect i) collect (loop for m in b collect (+ n m)))))) (pp (loop for n in (remove-duplicates b) collect (list n (count n b) (/ (float (count n b)) (length b)))))))