#!/usr/bin/perl
#
# eg3: 2nd coderef example: double_array()
#

use strict;
use warnings;
use Function::Parameters qw(:strict);

fun double_array(@x)
{
	return map { $_ * 2 } @x;
}

my $coderef = \&double_array;

# TIME PASSES...

my @array = $coderef->( 1, 2, 3 );

my $str = join(',',@array);
print "array: $str\n";
