On Wed, 13 Aug 2003, Nicholas Clark wrote:
I'm not convinced that it's a great idea to sit it in a top level
namespace. Is it about cartography? Or data manipulation?
List::Maptastic?
One function is for mapping hashes. So it would have to be
Collection::Maptastic, or
Shevek ([EMAIL PROTECTED]) wrote:
On Mon, 11 Aug 2003, Mark Fowler wrote:
I have this:
[ [ 1, 2, 3, ],
[ 5, 6, 7, ], ]
And I want this:
[ [ 1, 5, ],
[ 2, 6, ],
[ 3, 7, ], ]
Don't like the number 4 ?-)
How do I do that?
Use APL.
Or Ruby 1.8:
Mark Fowler wrote:
But does anyone know a module that can do this? Any super fast cleverness
that I don't want to even think about?
Matrix rotation? Cf. PDL.
--
Robin Berjon [EMAIL PROTECTED]
Research Engineer, Expwayhttp://expway.fr/
7FC0 6F5F D864 EFB8 08CE 8E74 58E6 D5DB 4889 2488
If you nab mapcar[0] this is insanely simple
use mapcar;
use Data::Dumper;
my $arrays= [ [1..3], [5..7] ];
my @reordered = mapcar { [EMAIL PROTECTED] } @$arrays;
print Dumper([EMAIL PROTECTED]);
__output__
$VAR1 = [
[
1,
5
],
[
On Wed, 13 Aug 2003, Nicholas Clark wrote:
I'm not convinced that it's a great idea to sit it in a top level namespace.
Is it about cartography? Or data manipulation?
List::Maptastic?
--
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL PROTECTED],
If you nab mapcar[0] this is insanely simple
Shortly to be released to CPAN as Maptastic, as soon as I figure out
the iteration semantics.
Pre-release available at http://vilain.net/pm/Maptastic-0.99.tar.gz,
which has mapcar and mapcaru in it. Feedback most welcome.
[0]
I have this:
[ [ 1, 2, 3, ],
[ 5, 6, 7, ], ]
And I want this:
[ [ 1, 5, ],
[ 2, 6, ],
[ 3, 7, ], ]
How do I do that? I mean, I can write this code:
sub reorder
{
my $new = [];
foreach my $col_no (0..(@{ $_[0]-[0] } - 1))
{
my $new_row = [];
foreach my $row
On Wed, Aug 13, 2003 at 06:02:59PM +0100, Sam Vilain wrote:
If you nab mapcar[0] this is insanely simple
Shortly to be released to CPAN as Maptastic, as soon as I figure out
the iteration semantics.
Pre-release available at http://vilain.net/pm/Maptastic-0.99.tar.gz,
which has
On Wed, 13 Aug 2003, Mark Fowler wrote:
On Wed, 13 Aug 2003, Nicholas Clark wrote:
I'm not convinced that it's a great idea to sit it in a top level
namespace. Is it about cartography? Or data manipulation?
List::Maptastic?
The function in question does matrix rotation -- that's
On Wed, 13 Aug 2003 11:23:41 +0100 (BST)
Mark Fowler [EMAIL PROTECTED] wrote:
On Tue, 12 Aug 2003, Dan Brook wrote:
If you nab mapcar[0] this is insanely simple
Interesting. Is there something like this on the CPAN? It's a bit
hard to put a page from perlmonks into a PREREQ_PM
There's
On Tue, 12 Aug 2003, Dan Brook wrote:
If you nab mapcar[0] this is insanely simple
Interesting. Is there something like this on the CPAN? It's a bit hard
to put a page from perlmonks into a PREREQ_PM
Mark.
--
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL
On Mon, 11 Aug 2003, Mark Fowler wrote:
I have this:
[ [ 1, 2, 3, ],
[ 5, 6, 7, ], ]
And I want this:
[ [ 1, 5, ],
[ 2, 6, ],
[ 3, 7, ], ]
How do I do that? I mean, I can write this code:
Use APL.
Alternatively, something like:
map { my $a = $_; map {
12 matches
Mail list logo