Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: ReplaceAll evaluation

  • To: mathgroup at
  • Subject: [mg104439] Re: [mg104391] ReplaceAll evaluation
  • From: Leonid Shifrin <lshifr at>
  • Date: Sat, 31 Oct 2009 01:54:57 -0500 (EST)
  • References: <>

Hi Rui,

I would make my own function with a HoldFirst attribute.

SetAttributes[replaceAllUnevaluated, HoldFirst];
replaceAllUnevaluated[expr_, rules_] := Unevaluated[expr] /. rules;


On Fri, Oct 30, 2009 at 10:18 AM, Rui <rui.rojo at> wrote:

> I found myself writing Unevaluate[blabla..balbal] /. Rules way too
> often. Most of the times I don't want the /. to evaluate it before
> replacing.
> Is there any nice way to do it?
> Or I should set the attribute HoldFirst, or type that all the time, or
> create my own function?
> Thanks
> Rui Rojo

  • Prev by Date: Re: Wrong Simplify[] Answer for Simplify[Cos[x]^4-Sin[x]^4]?
  • Next by Date: Re: Wrong Simplify[] Answer for
  • Previous by thread: ReplaceAll evaluation
  • Next by thread: Re: ReplaceAll evaluation