Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试为接收两个或更多参数的函数指定函数类型。对于具有一个参数的函数,这很容易:
var myFunction : Int -> Void;
您可以使用它引用这样的函数:
function doSomething ( param1 : Int ) : Void { ... } ... myFunction = doSomething;
但是如何引用具有两个或多个参数的函数呢?不幸的是,仍然没有关于此的完整文档。
提前致谢!
我的 Haxe 有点生锈了,但是...
var myFunction : Int -> Int -> Void;
一个接受两个Int参数并返回的函数Void。
Int
Void