racket solutions for 1 and 2

This commit is contained in:
Lowl3v3l 2017-05-09 19:20:46 +02:00
parent 6d754b0312
commit faf8f4962a
2 changed files with 23 additions and 0 deletions

10
1/euler1.rkt Normal file
View file

@ -0,0 +1,10 @@
#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)