
16 Mar
2011
16 Mar
'11
1:31 p.m.
Hello, A question recently popped into my mind: does lazy evaluation reduce the need to "proper" tail-recursion? I mean, for instance : fmap f [] = [] fmap f (x:xs) = f x : fmap f xs Here fmap is not tail-recursive, but thanks to the fact that operator (:) is lazy, I think that it may still run in constant space/time, am I right?