These two variations on Brent's work the same as the original- what subtle
differences happen by adding "anon" or "my" to the declarations?

my $sub_anon = do {
    anon proto foo (|) { * }
    multi foo (Int $x) { $x + 1 }
    multi foo (Str $y) { $y ~ 'a' }

    &foo;
}

my $sub_my = do {
    my proto foo (|) { * }
    my multi foo (Int $x) { $x + 1 }
    my multi foo (Str $y) { $y ~ 'a' }

    &foo;
}

Reply via email to