cwchen icon

[Perl 6] References to subroutines

cwchen | PRO | 11/29/17 02:06:25 AM UTC | 0 ⭐ | 12158 👁️ | Never ⏰ | []
Perl 6 |

0 B

|

None

|

0 👍

/

0 👎

sub square($n) {
    $n * $n;
}
 
my $f = □
$f(3) == 9 or die "Wrong value";

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎