Operate

Operate[p,f[x,y]]

gives p[f][x,y].

Operate[p,expr,n]

applies p at level n in the head of expr.

Details

  • Operate[p,f[x]] effectively applies the functional operator p to the function f.
  • Operate is essentially a generalization of Apply, which allows you to apply an operator to the head of an expression, rather than simply to replace the head. »

Examples

open allclose all

Basic Examples  (2)

Operate on the head of the expression with p:

Use a pure function:

Scope  (2)

Level Specifications  (2)

Operate at level 1, the head of the expression (default):

Operate at level 2 (the head of the head of the expression):

Properties & Relations  (3)

Operate can be iterated:

Apply is a special case of Operate that replaces the head of the expression:

Operate followed by Through is a form of composition:

Introduced in 1988
 (1.0)