I have the following working construction:
Select[ln125, # == Nearest[ln125, 551.748][[1]] &]
Here, ln125
is a one dimensional list.
What I want further is to apply this construction not only to ln125
, for example, but for a list of {ln125,ln126,ln127}
.
Let's say,
f[list_]:=Select[list, # == Nearest[list, 551.748][[1]] &]
I want to do this:
f /@ {ln125,ln126,ln127}.
The question is: is it possible to acheive my goal only using pure functions? That is, without defining dummy function (f
in my case)? The problem is that definition of f
already has pure function (as a criteria for Select
) and, thus, there should be two pure function of different depths (don't know how to name it correctly) at once. In other words, I want to turn the list
variable into #
but in a way that Mathematica can distinguish which #
goes with each different pure function.
Comments
Post a Comment