...could not find it in the docs for the life of me, over many weeks.
Hi Joe, Please allow me to share how I use docs when learning a new system (I learned Unix in a similar way thirty-odd years ago when we sometimes would to have to wait 0.5-1.0 hr for a free terminal to use the mainframe). Toward the bottom of the doc page for a command, there is a "See Also" section. Generally, these are commands that are related in some way.
So for instance, you found Map
already, since you used it in the question. I might think to myself, "Gee, f /@ {a, b, c} === {f[a], f[b], f[c]}
is like what I want but with roles of the functions and arguments switched. What I really want is something like {f, g, h} @/ x === {f[x], g[x], h[x]}
. I wonder if there is such a thing?"
So I would look up Map
and explore what's related. There are admittedly for Map
quite a few commands to explore, but Through
is on the list. (If I had thought that what I wanted was kind of like Apply
, a word in the question title, I would have had a shorter list to explore.) Still, if I had the patience to stick to it, I would probably have seen the first example in the docs for Through
, which shows exactly what I wanted above. In any case, I think it would have taken less than weeks, plus I probably would have learned about a few other functions on the See-Also list.