RosettaCodeData/Task/Function-composition/Perl-6/function-composition-2.pl6
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

3 lines
102 B
Raku

sub triple($n) { 3 * $n }
my &f = &triple &prefix:<-> { $^n + 2 };
say &f(5); # Prints "-21".