Re: Types for Perl 6: request for comments
[email protected] (Brent Laabs)
| Newsgroups | perl.perl6.language |
|---|---|
| Message-ID | <CAAPDpByOyhB8T-nYgSM8QJiDPwWaYOXyAU_-sDpwcw1=zjFG=A@mail.gmail.com> |
On Fri, Jun 26, 2015 at 4:32 AM, Giuseppe Castagna < [email protected]> wrote: > > >> my $sub = do { >> proto foo (|) { * } >> multi foo (Int $x) { $x + 1 } >> multi foo (Str $y) { $y ~ 'a' } >> >> &foo; >> } >> > > Oh yes, nice ... I think I will add it in my paper (and if you send me > your full name I will give credits to you) > > The do block version to make anonymous sub was my work, Brent Laabs. Using lexical subs to emulate anonymous multi subs was the first thing to come to mind when I read that Perl 6 didn't have them. Unfortunately, I haven't had time to read the rest of your paper, maybe this weekend.