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 2006

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

Search the Archive

Re: Re: (Mathematica wish list)

  • To: mathgroup at
  • Subject: [mg71406] Re: [mg71365] Re: (Mathematica wish list)
  • From: Daniel Lichtblau <danl at>
  • Date: Fri, 17 Nov 2006 04:30:28 -0500 (EST)
  • References: <><ejevgj$1to$> <>

Vince Virgilio wrote:
> On Nov 15, 7:00 am, Daniel Lichtblau <d... at> wrote:
>>getAllVariables[f_?NumericQ] := Sequence[]
>>getAllVariables[{}] := Sequence[]
>>getAllVariables[ll_List] :=
>>   Flatten[Union[Map[getAllVariables[#]&, ll]]]
> Daniel,
> I have a question about the style of this code. Why create a pure
> function from getAllVariables, especially since it already has single
> arity? Does it matter?
>>Daniel Lichtblau
>>Wolfram Research
> Thanks,
> Vince Virgilio

I had to scratch my head over that (or maybe it was lice).

The original code, that I altered for posting, comes from symbolic 
integration. There we look for all variables not the same as the 
integration variable. Hence it was originally of the form

getAllVariables[f_?NumericQ, x_] :=...

I simply did not catch the fact that the version I had altered could 
then be further simplified. So to answer your question, the pure 
function above is in fact superfluous.

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Triparitie K(8)*K(8)*K(8) model for proton decay in the Standard
  • Next by Date: Wolfram Workbench 1.0 now available
  • Previous by thread: Re: (Mathematica wish list)
  • Next by thread: Patterns_ to define linear operators?