NestedMap

NestedMap is a module to make nesting map{}s inside map{}s easierc.
Download

NestedMap Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • David Cantrell
  • Publisher web site:
  • http://search.cpan.org/~dcantrell/

NestedMap Tags


NestedMap Description

NestedMap is a module to make nesting map{}s inside map{}s easierc. NestedMap is a module to make nesting map{}s inside map{}s easierc.SYNOPSIS # show all combinations of (A,B,C) (a,b,c) and (1,2,3) print join("n", nestedmap { nestedmap { nestedmap { join('',@NestedMap::stack) } qw(A B C) } qw(a b c) } qw(1 2 3) ); # a zip() function for any number of lists of varying length sub zipn { my @args = @_; ]) ? $args] : '' } 0..$#args } 0 .. max(map { $#{$_} } 0..$#args) ] }NB - older versions of perl may not like the code blocks I use in these examples. You may have to use: nestedmap sub { ... }, @list;instead of nestedmap { ... } @list;See the test suite for examples of the above code modified to use that syntax. Requirements: · Perl


NestedMap Related Software