This repository has been archived on 2024-01-26. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
project-euler/e0010/euler0010.rkt

12 lines
No EOL
259 B
Racket

#lang racket
(require math/number-theory)
(define (primes it limit prim)
(if (equal? it limit)
prim
(if (prime? it)
(primes (+ it 1) limit (cons it prim))
(primes (+ it 1) limit prim))))
(apply + (primes 1 2000000 (list)))