Syntax
Function.From(functionType as type, function as function) as function
About
获取一元函数 function 并创建一个新函数,该函数 functionType 的类型使用从其参数构造列表并将其传递给该 function函数。
示例 1
List.Sum转换为两个参数函数,其参数一起添加。
用法
Function.From(type function (a as number, b as number) as number, List.Sum)(2, 1)
输出
3
示例 2
将列表转换为双参数函数的函数。
用法
Function.From(type function (a as text, b as text) as text, (list) => list{0} & list{1})("2", "1")
输出
"21"