Can you give some real examples where you use this construct?
I would make my own function with a HoldFirst attribute.
ClearAll[replaceAllUnevaluated];
SetAttributes[replaceAllUnevaluated, HoldFirst];
replaceAllUnevaluated[expr_, rules_] := Unevaluated[expr] /. rules;
Regards,
Leonid
On Fri, Oct 30, 2009 at 10:18 AM, Rui <rui....@gmail.com> 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
>
>
Can you give some real examples where you use this construct?
I would make my own function with a HoldFirst attribute.
ClearAll[replaceAllUnevaluated];
SetAttributes[replaceAllUnevaluated, HoldFirst];
replaceAllUnevaluated[expr_, rules_] := Unevaluated[expr] /. rules;
Regards,
Leonid
On Fri, Oct 30, 2009 at 10:18 AM, Rui <rui....@gmail.com> 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
>
>