MathGroup Archive 2007

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

Search the Archive

Re: Releasing several Holds simultaneously


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


  • Prev by Date: Re: Evaluation question
  • Next by Date: Re: Integrate question
  • Previous by thread: Releasing several Holds simultaneously
  • Next by thread: Re: Releasing several Holds simultaneously