http://www.perlmonks.org?node_id=405593


in reply to A mini-language for sequences (part 1)

On a somewhat related subject, I found Towards the best collection traversal interface an interesting read...
Most programming languages support collections, represented by an in-memory data structure, a file, a database, or a generating function. A programming language system gives us typically one of the two interfaces to systematically access elements of a collection. One traversal API is based on enumerators -- e.g., for-each, map, filter higher-order procedures -- of which the most general is fold. The second approach relies on streams, a.k.a. cursors, lazy lists.


-- All code is 100% tested and functional unless otherwise noted.
  • Comment on Re: A mini-language for sequences (part 1)