RE: Releasing several Holds simultaneously
- To: mathgroup at smc.vnet.net
- Subject: [mg82272] RE: [mg82248] Releasing several Holds simultaneously
- From: "Andrew Moylan" <andrew.j.moylan at gmail.com>
- Date: Wed, 17 Oct 2007 03:46:48 -0400 (EDT)
- References: <200710160727.DAA08807@smc.vnet.net> <CEB61950-22A8-40B0-8215-045B159914FD@mimuw.edu.pl>
Ah yes Hold->Identity was the other thing I tried. I guess I was put off by then having a defined like this: ?a >> Global`a >> a:=Identity[1] -----Original Message----- From: Andrzej Kozlowski [mailto:akoz at mimuw.edu.pl] Sent: Tuesday, 16 October 2007 7:58 PM To: Andrew Moylan Cc: mathgroup at smc.vnet.net Subject: [mg82272] Re: [mg82248] Releasing several Holds simultaneously *This message was transferred with a trial version of CommuniGate(tm) Pro* On 16 Oct 2007, at 16:27, Andrew Moylan wrote: > Hold[a := Hold[1]] > > How can I release both of these Holds (and thus execute a:=1) > simultaneously? > > ReleaseHold[%] doesn't work; it evaluates a := Hold[1] before the > other hold is removed. > > % /. Hold[x_]:>x does the same thing, because /. only matches once per > part. > > Hold[a := Hold[1]] /. Hold -> Identity a 1 Andrzej Kozlowski
- References:
- Releasing several Holds simultaneously
- From: "Andrew Moylan" <andrew.j.moylan@gmail.com>
- Releasing several Holds simultaneously