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/e0010/euler0010.rkt

12 lines
259 B
Racket
Raw Normal View History

#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)))