[Ilugc] learning a new language

  • From: lawgon@xxxxxxxxxxxxxxx (Kenneth Gonsalves)
  • Date: Thu, 10 Feb 2011 12:15:42 +0530

On Thu, 2011-02-10 at 11:23 +0530, Vinod Parthasarathy wrote:

Here's one way of writing factorial in Haskell.

factorial 0=1
factorial n=n*factorial(n-1)

neat!

Nice, isn't it? Just the way you learnt it in school! Pattern matching
rules! 

btw, welcome back to the list.
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/


Other related posts: