challenges/e2/e2.lisp

7 lines
174 B
Common Lisp
Raw Normal View History

2011-04-03 06:53:00 +00:00
(defun e2 ()
(let ((sum 0))
(do ((last 0 current)
(current 1 (+ current last)))
( (>= current 4000000) sum)
(if (= (rem current 2) 0)
(incf sum current)))))