develooper Front page | perl.perl6.language | Postings from July 2005

Curious use of .assuming in S06

Thread Next
From:
Autrijus Tang
Date:
July 29, 2005 12:06
Subject:
Curious use of .assuming in S06
Message ID:
20050729190650.GB83466@aut.dyndns.org
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?

This is S06-specific; neither A06 nor E06 exhibits this syntax.

Thanks,
/Autrijus/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About