Skip to content

Instantly share code, notes, and snippets.

@rodrigovidal
Created November 8, 2011 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodrigovidal/1349695 to your computer and use it in GitHub Desktop.
Save rodrigovidal/1349695 to your computer and use it in GitHub Desktop.
Euler 2
let fibonacci =
(0, 1)
|> Seq.unfold(fun (current, next) -> Some(current, (next, current + next)))
|> Seq.takeWhile(fun x -> x <= 4000000)
|> Seq.filter(fun x -> x % 2 = 0)
|> Seq.sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment