Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save diegopacheco/1983572 to your computer and use it in GitHub Desktop.
Haskell Product Recursion/Factorial Killer
factorial2 :: (Num a, Enum a) => a -> a
factorial2 n = product [1..n]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment