[Haskell-beginners] recursion problem.

Karl Voelker karl at karlv.net
Sat Feb 7 04:59:36 UTC 2015


On Fri, Feb 6, 2015, at 01:25 AM, Roelof Wobben wrote:
> but now when I do toDigits 0 , I see [] as output where I was expected
> [0]

In our written notation, "0" is a special case: it's the only integer
written with a leading zero. So don't be too surprised if your code
requires a special case for it.

-Karl


More information about the Beginners mailing list