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
| package haxe; | |
| class MainEvent { | |
| var f : Void -> Void; | |
| var prev : MainEvent; | |
| var next : MainEvent; | |
| public var priority(default,null) : Int; | |
| public function new(f,p) { |
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
| enum Error<T> { | |
| Code( i : Int ) : Error<Int>; | |
| Message( s : String ) : Error<String>; | |
| } | |
| function getError<T>( e : Error<T> ) : T { | |
| switch( e ) { | |
| case Code(c): return c; | |
| case Message(s): return s; | |
| } |
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 fib(x) { | |
| if( x <= 0 ) return 1; | |
| return fib(x-1) + fib(x-2); | |
| } | |
| static function writeFile() { | |
| var b = haxe.io.Bytes.alloc(65000); | |
| for( i in 0...2 ) { |
NewerOlder