in reply to Re: Unshift and push inside of map operation.
in thread Unshift and push inside of map operation.
map and also foreach don't well work with changing arrays.
That's an odd thing to say about map since map has nothing to do with arrays. map iterates over a list, and it has no problem working with a list built from an array. Changes to the array are ignored because map doesn't iterate over arrays.
foreach has optimizations which can causes unreliabilities when modifying the array over which it iterates, but map doesn't. It's very reliable in its behaviour.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Unshift and push inside of map operation. (optimizations)
by tye (Sage) on Sep 23, 2008 at 04:57 UTC | |
|
Re^3: Unshift and push inside of map operation.
by jethro (Monsignor) on Sep 23, 2008 at 04:23 UTC | |
by ikegami (Patriarch) on Sep 23, 2008 at 04:30 UTC | |
by dave_the_m (Monsignor) on Sep 23, 2008 at 12:39 UTC |