Skip to content

Instantly share code, notes, and snippets.

Created February 5, 2013 23:24
What would you like to do?
euler problem 06 with fsharp
open System
let squareOfSum n =
let i = n*(n+1)/2
let sumOfSquare n =
|> List.fold (fun acc x -> acc + x*x) 0
let solveEuler6 N =
(squareOfSum N)- (sumOfSquare N)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment