Created
January 22, 2021 02:37
-
-
Save psygo/2e558a20d5d0d8b944d3fb867a835e09 to your computer and use it in GitHub Desktop.
Recursively Sum with Haskell
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
-- My recursive version of a sum | |
mySum x y = if y == 0 | |
then x | |
else mySum (x + 1) (y - 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment