composition

composition (lower case) takes a set of functions as its arguments and returns a function that is the result of the sequential application of those functions, evaluating the rightmost expression first and yielding the result to the next function (directly to the left of the function just executed).

Function category: Special

Syntax

composition(args...)

Arguments

Description

args

Set of functions, separated by commas.

Example

Let's say we want to design a function that joins two strings and then capitalizes the result. Given the following data sample:

{
"user_one": {
"first_name": "Claude",
"last_name": "Monet"
},
"user_two": {
"first_name": "Edouard",
"last_name": "Manet"
}
}

We could write the function as follows:

MAP(composition(UPPER, CONCATENATE), [[user_one.first_name, user_one,last_name], [user_two.first_name, user_two.last_name]])

This would return the following:

["CLAUDEMONET","EDOUARDMANET"]