On Tue, Sep 25, 2012 at 8:45 PM, Richard O'Keefe <o...@cs.otago.ac.nz> wrote: > That doesn't work either. Consider the list [1,1,1,1,1]. > The element just after the 5th odd number in the list is 1; > takeWhile (/= 1) will thus return [] instead of [1,1,1,1].
I'm not sure that OP would prefer [1,1,1,1] to []. Another area of underspecification. -- gwern http://www.gwern.net _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe