Advertisement
cwchen

[Perl 6] References to subroutines

Nov 28th, 2017
2,822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.08 KB | None | 0 0
  1. sub square($n) {
  2.     $n * $n;
  3. }
  4.  
  5. my $f = □
  6. $f(3) == 9 or die "Wrong value";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement