
4 Jul
2007
4 Jul
'07
8:27 p.m.
2007/7/4, Michael Vanier
That's cool -- good point. takeWhile is also trivially defined in terms of foldr:
takeWhile p = foldr (\x r -> if p x then x:r else []) []
Can you do dropWhile in terms of foldr? I don't see how.
I 'm very bad in english, sorry. Here is a solution.... dropWhile in terms of fordr Author : Graham Hutton www.cs.nott.ac.uk/~gmh/fold.ps