> print sort { ... } <~ mymethod(42) <~ @b; > > call sort on what comezouta calling mymethod(42) on what comezouta @b. > I think. Indirect objects are still somewhat confusing. :) > > If I'm reading the info right on <~, then we want to make it clear > that you _don't_ put it between print and stuff you want to print, or > in other words that "this ain't cout".
If I read the conversations right, I think that line is trying to do: print (to stream mymethod(@b,42)) sort { ... } I think to make it work like you wanted, you need ()'s print (sort { ... } <~ mymethod(42) <~ @b); so that the <~ is directly associated with the sort; otherwise sort is a param to the print, and we're comezouta'ing the "where do i print sort" and sort takes the "how do i sort" first and the "What do i sort" second, yes? which makes me now wonder about all the sort { ... } <~ examples, and my understanding of the whole "where do <~ and ~> stick things?" thing ... OK, looking back, <~ binds to the "indirect object" ... and Damian's examples use map { ... } and grep { ... } with <~'s, so I guess the indirect object would work the same for sort { ... }, but now I'm not real sure on what the indirect object IS in all these calls ... Could someone explain how to know what's the indirect object? (who knew the "sentence diagramming" would be USEFUL!!) --attriel