Skip to content

Instantly share code, notes, and snippets.

@monkeygroover
Last active March 30, 2016 20:59
Show Gist options
  • Save monkeygroover/adc706346b8338e4683a to your computer and use it in GitHub Desktop.
Save monkeygroover/adc706346b8338e4683a to your computer and use it in GitHub Desktop.
euler16
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