Last active
March 30, 2016 20:59
-
-
Save monkeygroover/adc706346b8338e4683a to your computer and use it in GitHub Desktop.
euler16
This file contains hidden or 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
let units bi = (bi % 10I, bi/10I) | |
let rec sum bi = match units(bi) with | |
| (u, r) when r = 0I -> u | |
| (u, r) -> u + sum(r) | |
let result = sum(pown 2I 1000) | |
printfn "%A" result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment