in reply to Re^3: Perl Drag Racing - sum/delta list
in thread Perl Drag Racing - sum/delta list
I conjecture that map is good because it knows that the output list will be the same size as the input list, and can set things up properly ahead of time, as opposed to push'ing each element as a separate instruction
Very clever how you initialize $delta to avoid the shift and "+1" corrections. Many thanks for illustrating your techniques.
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl Drag Racing - sum/delta list
by Aristotle (Chancellor) on Aug 19, 2002 at 23:36 UTC |