24 Mar
2002
24 Mar
'02
12:35 a.m.
Hi,
You don't have to define cpsfold explicitly recursively since it can be expressed in terms of foldr:
Is this generally considered good design? That is, is it generally preferred to express functions in a nonrecursive style if that can be done using standard library functions like foldr and map and filter, etc? Okay, obviousloy everything *can* be done in that manner, so I guess my question is why should we write something using foldr when, imo, the explicitely recursive version is easier to parse (as a human). - Hal