Created
September 3, 2013 16:16
-
-
Save TheTomster/6426047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Euler 1 | |
(defun divides (x y) | |
(zerop (mod y x))) | |
(defun sum (l) | |
(reduce #'+ l)) | |
(defun range (a b) | |
(loop for i from a to b collecting i)) | |
(defun e1 () | |
(sum (remove-if (lambda (n) (not (or (divides 3 n) | |
(divides 5 n)))) | |
(range 1 999)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment