Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9836

Distinquishing #'s in nested pure functions

From "Dave Snead" <dsnead6@charter.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Distinquishing #'s in nested pure functions
Date 2012-04-27 10:49 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jndtj1$jit$1@smc.vnet.net> (permalink)
References <201204260933.FAA05752@smc.vnet.net>

Show all headers | View raw


Hi,

Is there a way to distinguish the #'s in nested pure functions?

As a simple example:

f[x_, y_] := x - y

Select[{1, 2, 3}, (f[#, #] & /@ {-1, -2, -3}) == {3, 4, 5} &]

I want the 1st # to correspond with the outer & (the equal)
and the 2nd # with the inner & (the map)
The answer in this example should by {2}
(of course, the statement as written above does not do the job)

Can Mathematica distinguish these #'s?

Thanks in advance,
Dave Snead

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Distinquishing #'s in nested pure functions "Dave Snead" <dsnead6@charter.net> - 2012-04-27 10:49 +0000
  Re: Distinquishing #'s in nested pure functions David Reiss <dbreiss@gmail.com> - 2012-04-28 09:30 +0000
  Re: Distinquishing #'s in nested pure functions A Retey <awnl@gmx-topmail.de> - 2012-04-28 09:31 +0000

csiph-web