Created
January 6, 2015 15:06
-
-
Save susisu/73d5c5e4b164dee26bd7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test { | |
static function main() { | |
trace("Haxe is great!"); | |
var nya : Foo = new Foo(function (x : String) : Void { | |
trace(x); | |
// btw | |
nya; | |
}); | |
nya.say(); | |
} | |
} | |
class Foo { | |
private var func : String -> Void; | |
public function new(func : String -> Void) { | |
this.func = func; | |
} | |
public function say() : Void { | |
this.func("foo"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment