| 1 |
use Test::More qw(no_plan); |
| 2 |
use strict; |
| 3 |
use warnings; |
| 4 |
|
| 5 |
use autobox::Core; |
| 6 |
|
| 7 |
|
| 8 |
my $times = sub { $_[0] * $_[1] }; |
| 9 |
|
| 10 |
my $times_two = $times->curry(2); |
| 11 |
my $times_four = $times->curry(4); |
| 12 |
|
| 13 |
is $times_two->(5), 10; |
| 14 |
is $times_four->(5), 20; |