racket solutions for problems 6 7 and 8
This commit is contained in:
parent
14379b035f
commit
04a8190ccb
3 changed files with 57 additions and 0 deletions
4
6/euler6.rkt
Normal file
4
6/euler6.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
#lang racket
|
||||
|
||||
(- (* (apply + (range 1 101)) (apply + (range 1 101)))
|
||||
(foldl + 0 (map (λ (x) (* x x)) (range 1 101))))
|
Reference in a new issue