Help for this page

Select Code to Download


  1. or download this
    
    sub Map {
    ...
    @increased = Map \&foo, (1,2,3);
    print "@increased\n";
    
  2. or download this
    
    sub Map {
    ...
    $inc = Map \&foo;
    @increased = $inc->(1,2,3);
    print "@increased\n";
    
  3. or download this
    sub Map {
      my $sub = shift();
    ...
        return @new_arr;
      }
    }
    
  4. or download this
    @incremented = Map(\&foo)->(1,2,3)
    
  5. or download this
    $Inc = Map(\&foo);
    @incremented = $Inc->(1,2,3)