Minilisp.pm/examples/euler2.lisp

6 lines
164 B
Common Lisp
Raw Normal View History

2021-04-06 22:21:26 +02:00
(let ((result
(do ((a 1 b) (b 2 (+ a b)) (sum 0)) ((> b 4000000) sum)
(when (evenp b)
(set sum (+ sum b))))))
(write-line result))