Overview of Haxe code snippets, examples and tutorials tagged with type params.
Dec 15, 2017 Abstract types / Strict typing for stringly-typed extern code
A common pattern, often found in (but not only in) dynamic languages, is to denote the type of some object with a string, for example:‥
Dec 15, 2017 Abstract types / Using Iterators as Generic Type Parameters
Iterators are a helpful Haxe structure. Any structure that implements the next and hasNext functions with the appropriate signature will allow you build a for loop. Arrays have an iterator() function that returns exactly this, and you don't need to call it, the for language construction does it for you.‥