
25 Sep
2012
25 Sep
'12
8:28 p.m.
On Tue, Sep 25, 2012 at 8:17 PM, Richard O'Keefe
Wrong. The original poster gave an explicit example in which even elements were *retained* in the output, they just weren't *counted*.
You are at least the fourth person to email me now to point this out. I'm glad I could make four people's day better with the joy of correction... But I never said it was a full solution - please note that I did include the output of the function! One could consider it a partial solution, however: that gives you the _nth_ odd, so if you want a list of numbers up to the _nth_ odd, that gives you a stop condition - 'takeWhile =/ nth+1' etc. A 2N traverse (which laziness might fuse to just 1 traverse, dunno). -- gwern http://www.gwern.net