in reply to Re: Puzzlement in Splitsville
in thread Puzzlement in Splitsville

Your solution works only because oddEls always gets an even length list. Replace @_ ? with @_ > 1 ?, and oddEls also works with odd length lists.

Replies are listed 'Best First'.
Re^3: Puzzlement in Splitsville
by BrowserUk (Pope) on Jun 20, 2005 at 11:16 UTC

    Are you sure?

    print oddEls 1 .. 9;; 1 3 5 7 9 print oddEls 1 .. 10;; 1 3 5 7 9

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.