Help with Haskell Program
Im learning Haskell and was wondering if anyone could tell me how to write a program called say triangle which takes a number and adds all previous numbers down to 0.
EG: triangle 4 = 4 3 2 1 0 so triangle 4 = 10?
Any idea's thanks.
|