Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling C# function with multiple arguments from F#

Tags:

.net

f#

It is easy to call f:Func<'T, 'T> from F# as 'T -> 'T by using f.Invoke

But how should I call f:Func<'T, 'T, 'T> from F# as 'T -> 'T -> 'T?

When I use f.Invoke I get 'T * 'T -> 'T, i.e. a tuple instead of two arguments.

like image 681
V.B. Avatar asked Dec 09 '22 12:12

V.B.


1 Answers

Try:

let g = f.Invoke |> FuncConvert.FuncFromTupled
like image 89
kwingho Avatar answered Dec 11 '22 02:12

kwingho