perl6-language  

Strange interaction between pairs and named binding

Autrijus Tang
Mon, 18 Jul 2005 05:42:23 -0700

This currently works in Pugs:

    for [1..10].pairs -> Pair $x { say $x.value }

But this does not:

    for [1..10].pairs -> $x { say $x.value }

Because the ruling that pairs must not be bound to parameters that are
not explicitly declared to handle them.  Is this a desirable behaviour?

Thanks,
/Autrijus/

Attachment: pgp5r3rYqcaLb.pgp
Description: PGP signature