Skip to content

Instantly share code, notes, and snippets.

@goofmint
Last active April 14, 2017 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/0cacf592fe0b26277fe046df1fb7f253 to your computer and use it in GitHub Desktop.
Save goofmint/0cacf592fe0b26277fe046df1fb7f253 to your computer and use it in GitHub Desktop.
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