ComapApply

ComapApply[{f1,f2,},expr]

gives {Apply[f1,expr],Apply[f2,expr],}.

ComapApply[fs]

represents an operator form of ComapApply that can be applied to an expression.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Replace the head of {1,2} with each element of a list:

Use the operator form of ComapApply:

Replace the head of an expression with the values in an association:

Scope  (3)

Use explicit pure functions:

ComapApply can be used on expressions with any head:

Replace the head of an expression with the values of an Association:

Options  (1)

Heads  (1)

Apply inside the head as well as arguments:

Properties & Relations  (8)

ComapApply successively replaces the head of an expression with the parts of another expression:

MapApply replaces the head of each part of an expression with another expression:

Through[p[f,g,][x,y,]] is equivalent to ComapApply[p[f,g,],{x,y,}]:

Compare this to the operator form of ComapApply:

ComapApply[p[f,g,],{x,y,}] can be used even when p[f,g,][x,y,] has a value:

When p[f,g,][x,y,] has a value, Through cannot be used:

ComapApply[{f1,f2,},expr] is equivalent to Map[f|->Apply[f,expr],{f1,f2,}] when the fi have no attributes:

ComapApply can replace the head of an expression with parts inside held expressions without allowing evaluation to proceed:

Use ReleaseHold to allow evaluation to proceed:

If only some arguments are held, only those arguments will not evaluate further:

Use Unevaluated to replace the head of an expression with different expressions without evaluating it first:

The expression is evaluated first by default:

Use Unevaluated to replace the head of an expression with the parts of an expression without evaluating it first:

The expression is evaluated first by default:

ComapApply can be parallelized automatically:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_comapapply, author="Wolfram Research", title="{ComapApply}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/ComapApply.html}", note=[Accessed: 05-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_comapapply, organization={Wolfram Research}, title={ComapApply}, year={2024}, url={https://reference.wolfram.com/language/ref/ComapApply.html}, note=[Accessed: 05-November-2024 ]}