Minilisp.pm/t/euler2.t
2021-04-09 00:01:27 +02:00

7 lines
212 B
Raku

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