racket solutions for 1 and 2
This commit is contained in:
parent
6d754b0312
commit
faf8f4962a
2 changed files with 23 additions and 0 deletions
10
1/euler1.rkt
Normal file
10
1/euler1.rkt
Normal 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)
|
Reference in a new issue