Maptastic

All map, all the time. Maperiffic baby, yeah!
Download

Maptastic Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sam Vilain
  • Publisher web site:
  • http://search.cpan.org/~samv/

Maptastic Tags


Maptastic Description

All map, all the time. Maperiffic baby, yeah! Maptastic is a Perl module that defines two maptabulous new varieties of that long-favourite map (see "map" in perlfunc). Two of these maps are more maplicious than map itself - because unlike vanilla map, it maps more than a single list! Mapendous!But the mappy feast does not stop there! No, to satisfy your ever-growing map cravings, there's a mapdiddlyumtious version of the original map that iterates over hashes! Mapnificent!SYNOPSIS use Maptastic qw(:perly); @a = (1, 2, 3); @b = qw(Mary Jane); @c = ('A' .. 'E'); %d = ( smokey => 1, cheese => 6, fire => 7, plant => 3.5 ); @spliced = map_shift { } (\@a, \@b, \@c); @mixed = map_for { } (\@a, \@b, \@c); %hashed = map_each { ( $_ > 4 ? @_ : () ) } \%d;Results after the above # map_shift / mapcaru @spliced = (, , , , ); # map_for / mapcar @mixed = (, , # some LISPs stop here , , ); # map_each %hashed = ( cheese => 6, fire => 7 ); Requirements: · Perl


Maptastic Related Software