Created
April 15, 2015 14:36
-
-
Save lmatt-bit/a74e17ccac39efe6f2e5 to your computer and use it in GitHub Desktop.
Sum from 0 to n
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 rec sum n = if n=0 then 0 else n + sum(n - 1) | |
| sum(10).Dump() //This is for LinqPad |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment