Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14174

Re: "Programming With Mathematica" Exercise help

From plank.in.sequim@gmail.com
Newsgroups comp.soft-sys.math.mathematica
Subject Re: "Programming With Mathematica" Exercise help
Date 2013-04-14 00:36 +0000
Message-ID <kkctm5$7er$1@smc.vnet.net> (permalink)
References <kk5r6r$ric$1@smc.vnet.net> <kk88ru$c1p$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


> 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.

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

"Programming With Mathematica" Exercise help plank.in.sequim@gmail.com - 2013-04-11 08:11 +0000
  Re: "Programming With Mathematica" Exercise help Peter Pein <petsie@dordos.net> - 2013-04-12 06:16 +0000
    Re: "Programming With Mathematica" Exercise help plank.in.sequim@gmail.com - 2013-04-14 00:36 +0000
  Re: "Programming With Mathematica" Exercise help spamslayer19@gmail.com - 2013-04-12 06:15 +0000
  Re: "Programming With Mathematica" Exercise help drallenbio@gmail.com - 2013-04-12 06:15 +0000
    Re: "Programming With Mathematica" Exercise help plank.in.sequim@gmail.com - 2013-04-14 00:36 +0000
  Re: "Programming With Mathematica" Exercise help Roland Franzius <roland.franzius@uos.de> - 2013-04-13 06:02 +0000
    Re: "Programming With Mathematica" Exercise help plank.in.sequim@gmail.com - 2013-04-14 00:36 +0000
  Re: "Programming With Mathematica" Exercise help plank.in.sequim@gmail.com - 2013-04-14 00:36 +0000

csiph-web