John observed: > I just read Apocalypse and Exegesis 3, and something stuck out at me > because of its omission, namely using hyper operators for reduction. > > $a ^+= @list; # should sum the elements of @list > > Larry says @a ^+ 1 will replicate the scalar value for all a's, and > Damian talks about doing summation with the reduce function without > mentioning this compact syntax. > > So am I overlooking some obvious reason why this won't work?
No. I expect that this would indeed work. Note that it's not really a replacement for C<reduce> since it *requires* the lvalue in order to work. But it is a nice idiom. Why didn't we mention it in A3/E3. Well, I suspect Larry didn't mention it because he didn't want to scare people *too* much. I didn't mention it for a much simpler reason: because, in the heat of trying to weld together a concise example to explain of everything Larry had designed, this neat corollary of ^ simply didn't occur to me. ;-) Damian