Brent Dax asked:

So

	@a ~> grep { ... } ~> @b

Is the same as

	@b = grep { ... } @a
Yes.



As in...

	class Array {
		...
		method grep (Array $ary: Code $code) returns Array {
			...
		}
		
		method grep (Code $code: Array $ary) returns Array {
			...
		}
	}
No. As in:

        sub grep (Code|Hash $selector, *@candidates) is multi {...}

        class Array {
            ...
            method grep(Array $self: *@candidates) {...}
	}

Multimethods don't belong to classes; they mediate interactions *between* classes.


? And this would automagically get mapped into Array::grep?
No. Both would be explicitly and separately defined.


(Reminds me of C++ operator overloading for e.g. "operator +(int,
MyStringType)"...)
Which is *exactly* why we're doing it slightly differently. ;-)

Damian

Reply via email to