in reply to Re^4: RFC: A Perlesque Introduction to Haskell, Part One (draft)
in thread RFC: A Perlesque Introduction to Haskell, Part One (DRAFT)
How do the Haskell examples handle those cases?
It doesn't. You can use "boolean guards" though to handle different cases:
otherwise is just a standard alias for True to make it read well.fac 0 = 1; fac n | n > 0 = n * fac (n-1) | otherwise = ...
ihb
|
---|