Functions are typed too. That's good for two reasons: you can pass a function as a parameter to another function, and you can also store typed functions in a variable!
All functions in haXe are typed, so for example, when you write:
public function outputString(st : String) : Void;
we know that the
outputString function takes one parameter of type
String and returns
Void (that actually means that it does not return any object). This is represented as the following type:
Now, imagine the following function:
public function sumAndCeil(a : Float, b : Int) : Int
Its type is:
Ok, this was the easy part.
As mentioned earlier, a function can be given as an ...