Are these equivalent? (Assuming reduce isn't going away) Larry Wall skribis 2005-05-04 5:36 (-0700): > $sum = \\+ @array; > $fact = \\* 1..$num;
$sum = reduce &infix:<+>, @arrayd; $fact = reduce &infix:<*>, 1..$num; > $firsttrue = \\|| @args; > $firstdef = \\// @args; > @sumrows := \\+« @rows; $firsttrue = reduce &infix:<||>, @args; $firstdef = reduce &infix:<//>, @args; @sumrows := map { reduce &infix:<+>, @$_ }, @rows; > Now here's the interesting part. The same critera apply to extra > lists added with <== or ==>. In other words, a function may be be > declared to recognize multiple input pipes as separate lists just > like a subscript recognizes multiple dimensions of slices. But the > default is to flatten all input pipes into a single input stream. Hm, if ==> and <== are made special syntax, maybe this would be possible? @foo ==> zip <== @bar > $sum = (R)+ @array; I like that. Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html