1
$\begingroup$

This question already has an answer here:

If we only consider functions with two variables, I expect g[#1, #2] & is the same as g[##] &. But in the following example, they are not the same. Why?

expr = f[x, y] + D[f[x, y], x]
(* -> f[x, y] + Derivative[1, 0][f][x, y] *)

expr /. f -> (g[#1, #2] &)
(* -> g[x, y] + Derivative[1, 0][g][x, y] *)

expr /. f -> (g[##] &)
(* -> g[x, y] *)
$\endgroup$

marked as duplicate by Kuba, Yves Klett, Community Dec 16 '15 at 15:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.