WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

MergingFunction

is an option for functions such as PersistentSymbol that specifies a function to apply to the list of values found.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
See Also
Related Guides
History
Cite this Page

MergingFunction

is an option for functions such as PersistentSymbol that specifies a function to apply to the list of values found.

Details

Identity return the list of all values
Flatten return the flattened list of all values
Merge [f] merge associations using the function f

Examples

open all close all

Basic Examples  (2)

Create a number of persistent values with key "pval" at different persistence locations:

Give all values that exist on $PersistencePath :

Give only the first value found:

Create a number of persistent values with key "lval" at different persistence locations:

Give the list of all values found:

Join the list values:

Flatten all sublists:

Scope  (3)

Create a complement of persistent values with key "lval" at various locations:

List all existing values for the key "lval" on $PersistencePath :

By default, only the first value is returned:

Join and flatten all sublists:

Join all sublists:

Create a complement of persistent associations with name "aval" at various locations:

List all existing values on $PersistencePath :

Merge the values of identical keys in the associations:

Define a default value for "mylist" with a custom merging function:

Define additional values at different persistence locations:

For looking up values, the custom merging function is now used:

See Also

PersistentSymbol   $PersistencePath   KeyCollisionFunction

History

Introduced in 2017 (11.1)

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2025_mergingfunction, author="Wolfram Research", title="{MergingFunction}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/MergingFunction.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_mergingfunction, organization={Wolfram Research}, title={MergingFunction}, year={2017}, url={https://reference.wolfram.com/language/ref/MergingFunction.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /