The sum of the primes below 10 is 2+3+5+7=17.Find the sum of all the primes below two million.
main.ts
import { primes } from "../util/sequence/prime.ts";
import { takeUntil } from "../util/functional.ts";
import { sum } from "../util/util.ts";
function main() {
const result = takeUntil(primes(), (n) => n > 2_000_000)
.reduce(sum)
console.log(result) //?
}
main();