News for hackers. Stuff that matters.
Re:Click by DangitBobby on Friday March 19, 2021 @09:15PM (#26519888)
> Reduce can do all of the above, but must return a lower dimension result from its input.

What do you mean by this? You can accumulate just about anything into the resulting object, including a copy of the original array.

Re:Click by SamBam on Friday March 19, 2021 @09:51PM (#26520060)
I think it's just being confusingly stated. GP already said that reduce could implement map. I think it's merely that reduce can just output a single result, of any type. (Which is already more powerful than map, which must output an array.)

Of course, in fact you could hack anything in any of these, since you could be doing other work in the function called. But I think the general principle is sound.

Re:Click by thaumasiotes on Saturday March 20, 2021 @01:57AM (#26521093)
> (Which is already more powerful than map, which must output an array.)

Don't tell Common Lisp.