Partager via


Function.From

Syntaxe

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

À propos

Prend une fonction function unaire et crée une fonction avec le type functionType qui construit une liste de ses arguments et la transmet à function.

Exemple 1

List.Sum Convertit en fonction à deux arguments dont les arguments sont ajoutés ensemble.

Utilisation

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

Output

3

Exemple 2

Convertit une fonction prenant une liste en fonction à deux arguments.

Utilisation

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

Output

"21"