in reply to foreach/map equivalency
map iterates over the array, as you suspected it would... in the case you provide, you use a push in the first example, but don't in the second. So, you're seeing the default, Larry-thought-it-wise behavior in the second.
Rewrite that map statement so that it, too, uses push, and it oughta do what you expected.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: foreach/map equivalency
by chromatic (Archbishop) on Nov 11, 2001 at 02:27 UTC | |
by gloryhack (Deacon) on Nov 11, 2001 at 04:07 UTC | |
by chromatic (Archbishop) on Nov 12, 2001 at 08:36 UTC | |
by gloryhack (Deacon) on Nov 12, 2001 at 10:20 UTC | |
by chromatic (Archbishop) on Nov 12, 2001 at 23:22 UTC |