[Haskell-beginners] factorial question
Brandon Allbery
allbery.b at gmail.com
Fri Aug 31 18:30:34 CEST 2012
On Fri, Aug 31, 2012 at 12:23 PM, KMandPJLynch <kmandpjlynch at verizon.net>wrote:
> *factorial' :: Int -> Int*
> *factorial' 0 = 1*
> *factorial' (n+1) = (n+1)*factorial' n*
>
n+k patterns were removed from Haskell 2010. You can re-enable them in GHC
with
{-# LANGUAGE NPlusKPatterns #-}
or
{-# LANGUAGE Haskell98 #-}
as the first line of the source file.
--
brandon s allbery allbery.b at gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120831/745221c4/attachment.htm>
More information about the Beginners
mailing list