in reply to Re: eliding number ranges
in thread eliding number ranges

Your elide_japhy function is wrong. On the input 2, 21, it returns "2-1".

Abigail

Replies are listed 'Best First'.
Re: Re: eliding number ranges
by japhy (Canon) on Nov 13, 2003 at 15:45 UTC
    Ooh. Well, since your solution far surpasses mine in efficiency, I wouldn't suggest using mine anyway.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;