This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
project-euler/1/euler1.rkt

7 lines
221 B
Racket
Raw Normal View History

#lang typed/racket
2017-05-09 19:20:46 +02:00
(foldl (λ ((x : Nonnegative-Integer)
(y : Nonnegative-Integer))
(if (or (zero? (remainder x 3))
(zero? (remainder x 5)))
(+ x y) y)) 0 (range 1 1000))