Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Specifying arguments inside nested functions

  • To: mathgroup at
  • Subject: [mg46117] Re: Specifying arguments inside nested functions
  • From: "Bo Le" <bole79 at>
  • Date: Sat, 7 Feb 2004 04:01:59 -0500 (EST)
  • References: <bvvnse$j7v$>
  • Sender: owner-wri-mathgroup at


I don't really understand your specific problem with matricies,
but like you, I also had the same problem with specifying arguments
inside the nested functions.

I am solving this problem with the Function[{vars},body],
which is the construct behind the infix notation and marking local
variables is what you want, right?



"Ray Koopman" <koopman at> wrote in message news:bvvnse$j7v$1 at
> I have two matrices, A and B, that have the same number of columns.
> I want to select the rows of A that differ in every position from
> every row of B. So I write
>    Select[A, And@@Map[Inner[Unequal,#1,#2,And]&, B]& ]
> But that won't work, because I have no way to tell Inner that one of
> its arguments should be the row of A that is being tested by Select,
> and the other argument should be the row of B from Map.
> Now, I realize that there are ways around the problem in this
> particular case. For instance, the Select test could be
>    And@@Map[FreeQ[Rest[#],First[#]]&, Transpose@Prepend[B,#]]&
> which checks B a column at a time and might well be more efficient.
> However, this is not the first time I've run into the problem of
> specifying arguments inside nested functions, and I wonder how other
> people handle it. Is there a general solution, or must I always
> ad hoc it?

  • Prev by Date: Re: random numbers?
  • Next by Date: Re: Find last NZ in list
  • Previous by thread: Re: Specifying arguments inside nested functions
  • Next by thread: Re: Specifying arguments inside nested functions