Function Composition & Operator Forms

The symbolic structure of the Wolfram Language makes it easy to create "operators" that can be composed and manipulated symbolically—forming "pipelines" of operations—and then applied to arguments. Some built-in functions also directly support a "curried" form, in which they can immediately be given as symbolic operators.

f@x — function application f[x]

(RefLink[Composition, paclet:ref/Composition]) or f@*g — left-to-right composition f[g[_]]

x//f — function application f[x]

(RefLink[RightComposition, paclet:ref/RightComposition]) or f/*g — right-to-left composition g[f[_]]

(RefLink[Construct, paclet:ref/Construct]) — construct an expression from its head and arguments

(RefLink[Function, paclet:ref/Function]) — turn any expression into a pure function that can be applied

(RefLink[Identity, paclet:ref/Identity]) — identity function

(RefLink[InverseFunction, paclet:ref/InverseFunction]) — symbolic inverse function

(RefLink[Inactive, paclet:ref/Inactive]) — a function made inactive

(RefLink[Curry, paclet:ref/Curry]) — turn a function into a "curried" operator form

Functions with Operator Forms

(RefLink[Select, paclet:ref/Select]) — represent a selection operator to apply to expressions

Rearranging Functional Forms

(RefLink[Operate, paclet:ref/Operate]) — form p[f][x] from p and f[x]

(RefLink[Through, paclet:ref/Through]) — form {f[x],g[x]} from {f,g}[x]

(RefLink[Distribute, paclet:ref/Distribute]) — distribute one symbolic function over another

(RefLink[Key, paclet:ref/Key]) — operator to extract a value from an association