Thank you Ertugrul, I think I got it now. My lesson here is to avoid recursion as much possible and use foldr' instead.There are too many pitfalls. -- Regards, Gabi http://bugspy.net