4

List iteration - Implementation

How do you manipulate lists? In what language?

In my very limited knowledge:
1. C++ Iterators
2. D Ranges
3. Linked Lists

See for ranges vs iterators http://informit.com/articles/...

Does anybody have links for advantages for iterators? Why should I use them?

Comments
  • 0
    Clojure. map, filter and reduce. (or the same functions in basically any functional language.)

    Java also now has the Stream API which allows you to do the same thing.

    someList.stream().map(object -> object.doStuff());

    someList.stream().filter(object -> object.property == someValue).collect(Collectors.toList());
  • 0
    Python iterators.
Add Comment