[Haskell-beginners] Offside rule for function arguments?

John Smith voldermort at hotmail.com
Mon Aug 23 02:33:13 EDT 2010


Why doesn't Haskell allow something like this?

fac 0 = 0
     1 = 1
     x = x * fac (x-1)

This would be clearer than repeating the function name each time, and follow the same pattern as guards and case.



More information about the Beginners mailing list