Minilisp.pm/t/euler2.t

5 lines
202 B
Raku

(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)))