Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I pulled the Euterpea source from the website and tried the tutorial in GHCi 7.0.4. It complained that the definition of

  times (n+1) m 
is invalid.

If anyone is trying out the tutorial and gets the same error, replace that definition of "times" with

  times n m = m :+: (times (n-1) m) 
and you should be good.


Hm, I guess that means n+k pattern matching is finally removed.


Yes, it was removed in the Haskell 2010 standard, which is the default from GHC 7.0. http://hackage.haskell.org/trac/haskell-prime/wiki/RemoveNPl...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: