6 lines
202 B
Perl
6 lines
202 B
Perl
|
(let ((result
|
||
|
(do ((a 1 b) (b 2 (+ a b)) (sum 0)) ((> b 4000000) sum)
|
||
|
(when (evenp b)
|
||
|
(set sum (+ sum b))))))
|
||
|
(expect "euler 2 - result is 4613732" (= result 4613732)))
|