>Atriel: >> Damian: >> Can I suggest that an alternative solution might be the following: >> >> Suppose Perl 6 had two new very low precedence operators: ~> and <~ >> (a.k.a. "bind rightwards" and "bind leftwards") >> >> @out = @a ~> grep {...} ~> map {...} ~> sort; >> >> @out = sort <~ map {...} <~ grep {...} <~ @a; >> >> That way, everything is still a method call, the ultra-low precedence of >> <~ and ~> eliminate the need for parens, and (best of all) the >> expressions actually *look* like processing sequences. > >(a) OOh, shiny! > >(b) Can <~ and ~> be used at the same time? > >I'm not entirely sure of what functions take two array params >meaningfully, but could we do:
Damian's proposal didn't say anything about array params. If I understood him correctly, then this should print "FOO" on standard out: my $foo = "FOO"; $foo ~> print; The opposite 'squiggly arrow' fiddles the indirect object, so perhaps this would print "FOO" on standard error (modulo the STDERR syntax, which I think changed when I wasn't looking): $foo ~> print <~ STDERR; Philip Disclaimer This communication together with any attachments transmitted with it ('this E-mail') is intended only for the use of the addressee and may contain information which is privileged and confidential. If the reader of this E-mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient you are notified that any use of this E-mail is prohibited. Addressees should ensure this E-mail is checked for viruses. The Carphone Warehouse Group PLC makes no representations as regards the absence of viruses in this E-mail. If you have received this E-mail in error please notify our ISe Response Team immediately by telephone on + 44 (0)20 8896 5828 or via E-mail at [EMAIL PROTECTED] Please then immediately destroy this E-mail and any copies of it. Please feel free to visit our website: UK http://www.carphonewarehouse.com Group http://www.phonehouse.com