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
@:forward(map, filter, copy, slice) | |
abstract ArrayRead<T>(Array<T>) from Array<T> to Iterable<T> { | |
@:arrayAccess inline function get(i:Int):T return this[i]; | |
public var length(get,never):Int; | |
inline function get_length() return this.length; | |
} |
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 Process<O> { | |
Emit(head:O,tail:Process<O>); | |
Held(ft:Future<Process<O>>); | |
Halt(e:Null<Error>); | |
} | |
typedef InOut<In, Out> = Process<Either<Callback<In>, Out>>; |
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
#if macro | |
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
#end | |
abstract Signal<T>(Array<T>) | |
{ | |
public inline function new() | |
{ | |
this = []; |
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 ; | |
using Tag; | |
class Main | |
{ | |
static function main() | |
{ | |
var t = "div".tag().att("id", "container") | |
.child("a".tag().att("href", "http://www.haxe.org") |
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
import haxe.macro.Expr; | |
import haxe.macro.Context; | |
class MacroLambda | |
{ | |
public static function main(): Void | |
{ | |
trace('Hello World'); |