Minilisp.pm/t/euler2.t

8 lines
212 B
Perl
Raw Normal View History

2021-04-09 00:01:27 +02:00
(plan 1)
2021-04-06 22:41:49 +02:00
(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)))