Minilisp.pm/examples/euler1.lisp

7 lines
216 B
Common Lisp
Raw Normal View History

2021-04-05 04:04:23 +02:00
;; (defun range (start end)
;; (if (< start end)
;; (cons start (range (+ 1 start) end))
;; (list)))
(write-line (reduce + (filter (lambda (x) (or (zerop (mod x 3)) (zerop (mod x 5)))) (range 1 1000))))