DefineResourceFunction

DefineResourceFunction[f]

defines a resource function that can be applied to arguments to give the same result as f[].

DefineResourceFunction[f,name]

uses name as the name of the resource function.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Create a new ResourceFunction:

Create a ResourceFunction from a symbol:

Apply the resulting function to arguments:

Properties & Relations  (2)

Dependencies are automatically included in the resource:

The resource works even if the original definitions are cleared:

If no name is given for a pure function, an "Untitled" name is automatically generated:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_defineresourcefunction, author="Wolfram Research", title="{DefineResourceFunction}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/DefineResourceFunction.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_defineresourcefunction, organization={Wolfram Research}, title={DefineResourceFunction}, year={2019}, url={https://reference.wolfram.com/language/ref/DefineResourceFunction.html}, note=[Accessed: 22-December-2024 ]}