Created
May 1, 2012 21:37
-
-
Save chribben/2571631 to your computer and use it in GitHub Desktop.
F# implementation of list sum
This file contains 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 list = | |
match list with | |
| [] -> 0; | |
| h::t -> h + sum t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment