Daniel's answer es la correcta - que responde a lo que su pregunta debería haber pedido!
Pero por diversión aquí hay algo más cercano a lo que realmente hizo su pregunta.
f[a_,b_,c_] := a + b + c
g[f_, d_] := Catch[Module[{dv},
Check[dv = DownValues[f], Throw[$Failed], {DownValues::sym}];
Switch[Length[dv],
0, Print["No DownValues"]; $Failed,
1, dv[[1, 2]] + d,
_?(# > 1 &), Print["More than one DownValue - using the first!"];
dv[[1, 2]] + d,
_, Print["huh?!"]; $Failed]]]
prueba de que:
In[3]:= g[f, d]
Out[3]= a + b + c + d
definir otra función:
ff[a_, b_, c_] := a b c
In[5]:= g[ff, d]
Out[5]= a b c + d
y darle una segunda definición:
In[6]:= ff[a_, b_] := a + b
In[7]:= DownValues[ff]
Out[7]= {HoldPattern[ff[a_,b_,c_]] :> a b c, HoldPattern[ff[a_,b_]] :> a+b}
In[8]:= g[ff, d]
During evaluation of In[8]:= More than one DownValue - using the first!
Out[8]= a b c + d
Por supuesto, el hecho de que Don Pase cualquier argumento al f
en g[f_,d_]
(en la mayoría de los casos) hará que este tipo de cosas sean bastante inútiles ...
Su pregunta parece ser: "¿Cómo se define una función que toma otra función como uno de sus argumentos" – DavidC