Advertisement
cwchen

[Perl 6] The syntactic sugar for function object.

Nov 28th, 2017
3,417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.06 KB | None | 0 0
  1. my $f = -> $x { $x + 1; };
  2.  
  3. $f(3) == 4 or die "Wrong value";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement