in reply to Inverted logic
Or, just count by 4s and 2s:
{ my $x; say for map { $x += $_ } 1,(4,2)x($LIM/6) }1 5 7 11 13 17 19 . .
(At least 15x faster than your Grandma's best nested loop, too.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inverted logic
by BrowserUk (Patriarch) on Jul 24, 2013 at 17:42 UTC | |
by rjt (Curate) on Jul 24, 2013 at 17:55 UTC |