Power Query

Searchâ€¦

published

Function.From

Function.From

Creates a function with a specific parameter signature on top of a function that takes a single list argument

function (`functionType`

as type,`function`

as function) as function

Description

Takes a unary function

`function`

and creates a new function with the type `functionType`

that constructs a list out of its arguments and passes it to `function`

.Category

Function

Examples

Converts List.Sum into a two-argument function whose arguments are added together

1

Function.From(type function (a as number, b as number) as number, List.Sum)(2, 1)

Copied!

3

Converts a function taking a list into a two-argument function

1

Function.From(type function (a as text, b as text) as text, (list) => list{0} & list{1})("2", "1")

Copied!

"21"

Last modified 3yr ago

Copy link