in reply to Re^2: Answer: Easy way to list prime numbers 1 to 100
in thread Easy way to list prime numbers 1 to 100
Whilst I agree that deprecated is too strong a word and that it is no longer wasteful to use it in this way, it does seem semantically odd to use map in a void context, which I think has always been one of the major objections to doing this, something like:
is probably closer to being clear (for me at any rate.)do { push(@prime,$_) if ($_ % 2) } for (2 .. 100);
/J\
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Answer: Easy way to list prime numbers 1 to 100
by BrowserUk (Patriarch) on May 23, 2006 at 10:00 UTC | |
by gellyfish (Monsignor) on May 23, 2006 at 10:25 UTC |