MathGroup Archive 2006

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

Search the Archive

Re: HoldFirst question

  • To: mathgroup at
  • Subject: [mg65535] Re: HoldFirst question
  • From: David Bailey <dave at>
  • Date: Thu, 6 Apr 2006 06:52:59 -0400 (EDT)
  • References: <e10901$lio$>
  • Sender: owner-wri-mathgroup at

Yaroslav Bulatov wrote:
> f=5;f[a_]=a gives an error because it evaluates f[a_] to 5[a_]
> But Set is HoldFirst, doesn't that mean that f[a_] will be held
> unevaluated?
Bear in mind that a HoldFirst function can evaluate its argument - it is 
just that this does not happen automatically. It is easy to write such a 
function yourself:


Set clearly evaluates the Head of the lhs.

David Bailey

  • Prev by Date: Re: HoldFirst confusion
  • Next by Date: Re: Count Function
  • Previous by thread: Re: HoldFirst question
  • Next by thread: Re: HoldFirst question