Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created March 6, 2012 04:34
Show Gist options
  • Select an option

  • Save diegopacheco/1983529 to your computer and use it in GitHub Desktop.

Select an option

Save diegopacheco/1983529 to your computer and use it in GitHub Desktop.
Haskell Factorial Recursion
factorial :: Num a => a -> a
factorial 0 = 1
factorial n = n * factorial (n-1)
@mudroljub

Copy link
Copy Markdown

Could not deduce (Eq a) arising from the literal ‘0’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment