2
$\begingroup$

Whats the difference between Composition @* and prefix @?

Composition[f,g,h][x] f@g@h[x]

Functionally they both seem to give the same result.

$\endgroup$
1
  • 3
    $\begingroup$ Compare f@*g /@ {x, y} with f@g /@ {x, y} $\endgroup$ – Carl Woll Mar 23 '19 at 0:25
5
$\begingroup$
ClearAll[f, g]
h = f@g
h[x]      (* f[g][x] *)
h = f@*g
h[x]      (* f[g[x]] *)
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.