Skip to content

Instantly share code, notes, and snippets.

@ConnorBaker
Last active February 23, 2019 00:50
Show Gist options
  • Select an option

  • Save ConnorBaker/189404b7cf0be5d7967c2fa6deb7a25d to your computer and use it in GitHub Desktop.

Select an option

Save ConnorBaker/189404b7cf0be5d7967c2fa6deb7a25d to your computer and use it in GitHub Desktop.
Programming in Haskell, 2nd ed.: Chapter 6: Problem 2
sumdown :: Int -> Int
sumdown 0 = 0
sumdown n = n + sumdown (n - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment