Skip to content

Instantly share code, notes, and snippets.

@Tyralion
Created November 10, 2015 18:37
Show Gist options
  • Select an option

  • Save Tyralion/2a436216a461de7f971c to your computer and use it in GitHub Desktop.

Select an option

Save Tyralion/2a436216a461de7f971c to your computer and use it in GitHub Desktop.
factorial4 :: Integer -> Integer
factorial4 n | n == 0 = 1
| n > 0 = n * factorial4(n - 1)
| otherwise = error "arg must be >= 0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment