On Wed, Jun 2, 2010 at 12:51 PM, <pugs-comm...@feather.perl6.nl> wrote:
> + > + (1,2,3,4) »+« (1,2) # always error > + (1,2,3,4) «+» (1,2) # 2,4,4,6 rhs dwims to ((1,2) xx *).batch(4) > + (1,2,3) «+» (1,2) # 2,4,4 rhs dwims to ((1,2) xx *).batch(3) > + (1,2,3,4) «+« (1,2) # 2,4 lhs dwims to (1,2,3,4).batch(2) > + (1,2,3,4) »+» (1,2) # 2,4,4,6 rhs dwims to ((1,2) xx *).batch(4) > + (1,2,3) »+» (1,2) # 2,4,4,6 rhs dwims to ((1,2) xx *).batch(3) > + (1,2,3) »+» 1 # 2,4,4,6 rhs dwims to (1 xx *).batch(3) > > Is there some automatic translation of these examples into tests? If not, here's what they'd be: ok(( (1,2,3,4) «+» (1,2) ) ~~ (2,4,4,6) ) ok(( (1,2,3) «+» (1,2) ) ~~ (2,4,4) ) ok(( (1,2,3,4) «+« (1,2) ) ~~ (2,4) ) ok(( (1,2,3,4) »+» (1,2) ) ~~ (2,4,4,6) ) ok(( (1,2,3) »+» (1,2) ) ~~ (2,4,4,6) ) ok(( (1,2,3) »+» 1 ) ~~ (2,4,4,6) ) I tested these all with Rakudo, and they all currently fail, though I guess that's not shocking. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs