Help understanding syntax in S06 "Unpacking tree node parameters"

2008-04-12 Thread John M. Dlugosz
multi traverse ( NAry $top ( :kids [$eldest, [EMAIL PROTECTED] ) ) { The inner signature is :( :kids [$eldest, [EMAIL PROTECTED] ) This starts out like a named-only parameter, :xx or :xx($yy) but then there is a space and an array. :xx @yy I don't follow that.

Re: Unpacking tree node parameters

2006-09-13 Thread Audrey Tang
在 Sep 4, 2006 2:11 AM 時,Gaal Yahas 寫到: Unless I'm mistaken, this doesn't cast back to subroutine signature land very well: sub f1 (Dog ($fido, $spot)) { ... } sub f2 (Dog $ ($fido, $spot)) { ... } sub f3 (Dog :($fido, $spot)) { ... } Correct. Unless Audrey's latest S

Unpacking tree node parameters

2006-09-03 Thread Gaal Yahas
> sub traverse ( BinTree $top ( $left, $right ) ) { ... } L has two infelicities I wanted to fix with a patch. The first is that this style of unpacking is "really" syntactically a Signature, but most the examples in this section abbreviate out the optional colon. (The above is more formally spe