Skip to content

Instantly share code, notes, and snippets.

@goofmint
Last active April 14, 2017 05:32
Embed
What would you like to do?
2.md
@:generic
class MyValue<T> {
public var value:T;
public function new(value:T) {
this.value = value;
}
}
class Main {
static public function main() {
var a = new MyValue<String>("Hello");
var b = new MyValue<Int>(42);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment