I have a function whose parameters are passed "by reference"
Clear[foo]
SetAttributes[foo, HoldFirst]
foo[t_] := t = 10
Is it possible to create an alias for t
within foo
, so inside the function I can call it something else? I'm looking for something like
foo[t_] := With[{k = t}, k = 10]
But instead of With
I want something that keeps t
unevaluated until inside the function body.