in reply to Re^3: Unhappy returns
in thread Unhappy returns
The difference is that foreach is a statement, and as such does not return anything. The context in which its body is evaluated is therefore never of any interest, any more than it is of interest which context the body of an if or while is evaluated in.
map and grep OTOH are expressions and do return something; which means context is paramount.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Unhappy returns
by ysth (Canon) on Oct 10, 2005 at 15:23 UTC | |
by Aristotle (Chancellor) on Oct 10, 2005 at 15:30 UTC | |
by ysth (Canon) on Oct 10, 2005 at 18:10 UTC | |
by Aristotle (Chancellor) on Oct 10, 2005 at 19:22 UTC | |
by sauoq (Abbot) on Oct 10, 2005 at 17:01 UTC | |
by ysth (Canon) on Oct 10, 2005 at 18:00 UTC | |
by Aristotle (Chancellor) on Oct 10, 2005 at 18:38 UTC | |
by ysth (Canon) on Oct 11, 2005 at 04:33 UTC | |
by sauoq (Abbot) on Oct 10, 2005 at 20:42 UTC | |
by Perl Mouse (Chaplain) on Oct 11, 2005 at 09:38 UTC |