Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
CS 101c Lab02 Part A Question 8
mos_basik
Apr 29th, 2013
134
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Haskell
0.16 KB
| None
|
0
0
raw
download
clone
embed
print
report
factorial
::
(
Num
x,
Ord
x
)
=>
x
->
x
factorial a
|
a
<
0
=
error
"Factorial not defined for negative numbers."
factorial
0
=
1
factorial a
=
a
*
(
factorial
(
a
-
1
)
)
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
B7800 HYLK session 1985
8 hours ago | 2.25 KB
me
13 hours ago | 0.06 KB
FED RESPONSE TEMPLATES: FED HTML Review Feedb...
1 day ago | 0.79 KB
disable email per category (not fully tested)
1 day ago | 0.82 KB
Neuromancer — The Construct Cut (Complete Una...
1 day ago | 3.30 KB
GLUC6
1 day ago | 1.56 KB
Mapscan v1.0 - Archeagus Grey Hack Series, Ep...
JavaScript | 1 day ago | 3.33 KB
Untitled
1 day ago | 17.15 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!