Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #light
- open System
- (*
- My solution to project euler problem #7
- *)
- let isPrime x =
- {2 .. int(System.Math.Sqrt(float(x)))}
- |> Seq.filter(fun d -> x % d = 0) |> Seq.is_empty
- let primes =
- seq { for x in 2 .. Int32.MaxValue do
- if isPrime x then yield x }
- let problem7 =
- Seq.nth (10001 - 1) primes
Add Comment
Please, Sign In to add comment