【发布时间】:2015-06-03 17:54:25
【问题描述】:
给定 F# 高阶函数(在参数中取一个函数):
let ApplyOn2 (f:int->int) = f(2)
和 C# 函数
public static int Increment(int a) { return a++; }
如何使用Increment 作为参数调用ApplyOn2(来自C#)?
请注意ApplyOn2 导出为Microsoft.FSharp.Core.FSharpFunc<int,int> 与Increment 的签名不匹配。
【问题讨论】: