Skip to content

@barefootcoder /gist:4208557
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Example of alias parameters as requested by Gabor in Perl Weekly
#! /usr/bin/env perl
use Modern::Perl;
use Method::Signatures;
func foo(\@bar, \@baz)
{
return map { $bar[$_] + $baz[$_] } 0..$#bar;
}
my @x = (2, 5, 8, 1);
my @y = (7, 3, 1, 6);
say join(', ', foo(\@x, \@y)); # 9, 8, 9, 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.