Perl 6 More laziness and lists #31

Range is interesting

                    Iterable
                       |
     +------------------------------+
     |                              |
    List                         Iterator
     |                              |
  +------+            +----------------------------+
  |      |            |        |         |         |
Array   LoL       ListIter  MapIter  GatherIter  Range

Since Range has a .reify, it can act as an Iterator.

The Range.iterator method (needed for all Iterable) just returns self.

Might relocate Range to Iterable at some point

Copyright © 2012
http://www.pmichaud.com/2012/pres/