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
2017-05-09 19:20:46 +02:00

10 lines
253 B
Racket

#lang racket
(define (multiples limit)
(foldl + 0 (filter (lambda (x) (cond
[(= 0 (remainder x 3)) #t]
[(= 0 (remainder x 5)) #t]
(else #f)))
(range limit))))
(multiples 1000)