Skip to content

Instantly share code, notes, and snippets.

@psygo
Created January 22, 2021 02:37
Show Gist options
  • Save psygo/2e558a20d5d0d8b944d3fb867a835e09 to your computer and use it in GitHub Desktop.
Save psygo/2e558a20d5d0d8b944d3fb867a835e09 to your computer and use it in GitHub Desktop.
Recursively Sum with Haskell
-- 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