6 lines
259 B
Perl
6 lines
259 B
Perl
|
(defun range (start end)
|
||
|
(do ((lst (list) (cons i lst)) (i start (+ 1 i))) ((= i end) lst)))
|
||
|
|
||
|
(let ((result (reduce + (filter (lambda (x) (or (zerop (mod x 3)) (zerop (mod x 5)))) (range 1 1000)))))
|
||
|
(expect "euler1 - result is 233168" (= result 233168)))
|