summaryrefslogtreecommitdiffstats
path: root/t/anon.t
blob: 059aa57ee3ca3d4ca64c0d68c1fd7e3212fcab60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;

use Fun;

my $fun = fun ($x, $y) { $x * $y };

is($fun->(3, 4), 12);

my $fun2 = fun ($z, $w = 10) { $z / $w };

is($fun2->(60), 6);

done_testing;