Function.From

Accepts a single function as input and generates a new function of type functionType. This new function takes multiple arguments, constructs a list with them, and then passes the list as input to the ...

Syntax

Function.From(functionType as type, function as function) as function

About

Accepts a single function as input and generates a new function of type functionType. This new function takes multiple arguments, constructs a list with them, and then passes the list as input to the original function.

Explanation

Example 1: Transforms the List.Sum function into a new function that takes two arguments and adds them together. Usage: Power Query MFunction.From(type function (a as number, b as number) as number, List.Sum)(2, 1) Output: 3 Example 2: Transforms a function that operates on a list into a new function that takes two arguments. Usage: Power Query MFunction.From(type function (a as text, b as text) as text, (list) => list{0} & list{1})("2", "1") Output: "21"