A List
is a collection for storing elements. On the surface, a list is similar to an Array. However, the underlying implementation is very different. This results in several functional differences:
[0]
.A simple example of working with lists:
class Main { static public function main() { var myList = new haxe.ds.List<Int>(); for (ii in 0...5) myList.add(ii); trace(myList); // {0, 1, 2, 3, 4} } }