perl6-language  

Re: Curious use of .assuming in S06

Brent 'Dax' Royal-Gordon
Fri, 29 Jul 2005 12:53:13 -0700

Autrijus Tang <[EMAIL PROTECTED]> wrote:
> In S06's Currying section, there are some strange looking examples:
> 
>     &textfrom := &substr.assuming(:str($text) :len(Inf));
> 
>     &textfrom := &substr.assuming:str($text):len(Inf);
> 
>     &woof ::= &bark:(Dog).assuming :pitch<low>;
> 
> Why is it allowed to omit comma between adverbial pairs, and even
> omit parens around method call arguments?  Is .assuming a special form?

Isn't this just another form of the syntactic rule that gives us
@array.grep:{ ... } ?

-- 
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]>
Perl and Parrot hacker