MathGroup Archive 2005

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

Search the Archive

Re: Evaluate[] not needed in With[]

  • To: mathgroup at
  • Subject: [mg63128] Re: Evaluate[] not needed in With[]
  • From: "Steven T. Hatton" <hattons at>
  • Date: Thu, 15 Dec 2005 03:06:36 -0500 (EST)
  • References: <dnbnav$5ti$> <dnbqf0$7af$>
  • Sender: owner-wri-mathgroup at

Jens-Peer Kuska wrote:

> Hi,
> With[] does a (clever) ReplaceAll[] of the constants
> you give, in its body before the body is evaluated.
> This means that the argument of ParametricPlot[] in your
> example is replaced by the value of hlines ..
> and so you don't need a Evaluate[].

I believe my confusion came from not really understanding what Evaluate[]
does in this context.  Basically, it takes and expression that evaluates to
a "function", and forces the expression to produce the function based on
the current environment, rather than waiting till the function itself would
be evaluated. It's kind of like producing a (mathematical) function of a
single variable from a function of several variable by replacing all but
one of the variables with constants.

Given an expression 'expr' that evaluates to a function, when expr appears
as the value of a Set expression it must be evaluated to the function. 
There are probably better words for this, but that's the general idea.
The Mathematica Wiki:
Math for Comp Sci
Math for the WWW:

  • Prev by Date: Re: Opener Icons for cell group.
  • Next by Date: Re: Why is y a local variable here?
  • Previous by thread: Re: Evaluate[] not needed in With[]
  • Next by thread: UML-like diagrams for Mathematica