Created
August 19, 2011 14:07
-
-
Save davidgrenier/1156878 to your computer and use it in GitHub Desktop.
Project Euler 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Seq.unfold (fun (c, n) -> Some(c, (n, c + n))) (1, 2) | |
|> Seq.takeWhile (fun v -> v <= 4000000) | |
|> Seq.filter (fun v -> v % 2 = 0) | |
|> Seq.sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment