On 05/07/2007, at 10:08 AM, Michael Vanier wrote:


Can you do dropWhile in terms of foldr?  I don't see how.

Mike

I considered that very question in an article I wrote for the Monad.Reader magazine:

   http://www.haskell.org/sitewiki/images/1/14/TMR-Issue6.pdf

If you are really keen, you might want to try altering the "working backwards with tuples" version into one which is properly lazy (many people who read the paper pointed out the omission).

Cheers,
Bernie.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to