Haxe Code Cookbook

iterator

Overview of Haxe code snippets, examples and tutorials tagged with iterator.

  • Mar 22, 2016 Data structures /

     iterator

    Haxe has a special range operator for(i in 0...5) to iterate forward. Because it requires min...max, you cannot do for(i in 5...0), thus you cannot iterate backwards using this syntax.‥

  • Apr 02, 2016 Data structures /

     iterator

    Often, in games or UI, you might want to create a grid. ‥

  • Mar 22, 2016 Data structures /

     iterator

    Haxe has a special range operator for(i in 0...5) to iterate forward. This does not allow to modify i in place, thus you cannot make it iterate in steps.‥

  • Nov 21, 2017 Abstract types /

     abstract-type type-params iterator

    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.‥