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  (4)

Operate can be iterated:

Operate[f,expr] is equivalent to MapAt[f,expr,0]:

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

Operate followed by Through is a form of composition:

Wolfram Research (1988), Operate, Wolfram Language function, https://reference.wolfram.com/language/ref/Operate.html.

Text

Wolfram Research (1988), Operate, Wolfram Language function, https://reference.wolfram.com/language/ref/Operate.html.

CMS

Wolfram Language. 1988. "Operate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Operate.html.

APA

Wolfram Language. (1988). Operate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Operate.html

BibTeX

@misc{reference.wolfram_2023_operate, author="Wolfram Research", title="{Operate}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Operate.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_operate, organization={Wolfram Research}, title={Operate}, year={1988}, url={https://reference.wolfram.com/language/ref/Operate.html}, note=[Accessed: 18-March-2024 ]}