Tag Info

New answers tagged

2

Although I cannot offer anything as robust and elegant as Rojo's single pass method I find this an interesting problem, and I present a limited alternative for the interest of others. For the sake of the examples I will use a modified y expression: x = Hold[1 + 1, 2 + 2, 3 + 3]; y = Hold[foo @ bar[2], bar[1], foo[1, bar[3]]]; If our parts are always at ...


2

One way of doing this would be using Defer or HoldForm. For example, let us define the functions a and b as follows: a[t_] := Defer[Integrate[t, {x, -∞, ∞}]] b[t_] := Defer[Integrate[t^2, {x, -∞, ∞}]] and a1[t_] := HoldForm[Integrate[Exp[-t], {x, 0, ∞}]] b1[t_] := HoldForm[Integrate[Exp[-t^2], {x, 0, ∞}]] They both return unevaluated function. ...


0

Late to this party, but here's a nice trick that surprisingly works: Composition[HoldForm, Plus] @@ RandomInteger[100, 2] OR Composition[HoldForm, Plus] @@ {RandomInteger[100], RandomInteger[100]}



Top 50 recent answers are included