in reply to Re: Incremental indexing exponential
in thread Incremental indexing exponential

I think your solution would get the digits reversed from the homework question spec.

Mike

Replies are listed 'Best First'.
Re^3: Incremental indexing exponential
by ikegami (Patriarch) on Jun 21, 2007 at 17:19 UTC

    Keeping in line with the base4 methaphor, I placed the lower-precedence digits at the lower indexes in @digits. Feel free to change the order in which they are stored (by substituting unshift for push) or to change the order in which they are printed (by using reverse, by iterating over them in reverse order, or ...).