MathGroup Archive 2013

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

Search the Archive

Re: "Programming With Mathematica" Exercise help


> Hold[z + 3] /. HoldPattern[z] -> a
> % // ReleaseHold

I would have thought this was the closest to what I would have called a "correct" answer since it actually uses hold and all the variables have their assigned values when the replacement takes place.  I really think the most elegant way of doing it is the Unevaluated answer and the one that uses Block but neither uses Hold.  Thanks - I guess HoldPattern is probably the magic I was looking for.



  • Prev by Date: Re: "Programming With Mathematica" Exercise help
  • Next by Date: Re: "Programming With Mathematica" Exercise help
  • Previous by thread: Re: "Programming With Mathematica" Exercise help
  • Next by thread: Re: "Programming With Mathematica" Exercise help