This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

function Operator

19th April 2023 at 10:31am
purposeapply a function to the input list, and return the result
inputa selection of titles passed as input to the function F
parameterF=first parameter is the function name, subsequent parameters are passed to the function by position
outputthe selection of titles returned from the function F

Learn more about how to use Filters

New in v5.3.0 The function operator applies a named function to the input titles, and returns the results from the function. The function is invoked once with all of the input titles (in contrast, the filter Operator invokes its function separately for each input title).

The first parameter of the function operator specifies the name of the function to be called. Subsequent parameters are passed to the function.

The mapping between the parameters is positional, with each consecutive parameter specified in the function call mapped to the corresponding parameter in the function definition. Any parameters that are not provided are given their default values.

Tip
Compare with the similar filter and subfilter operators which take a filter strings as their parameter instead of a named function, and does not permit parameters to be passed

Examples