
25 Sep
2012
25 Sep
'12
8:59 p.m.
On Tue, Sep 25, 2012 at 8:45 PM, Richard O'Keefe
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