chickadee » srfi-225 » dict->generator

dict->generator dto dict #!optional start endprocedure

Returns a SRFI 158 generator that, when invoked, returns the associations of dict as pairs. If the dictionary type is inherently ordered, associations are generated in the order specified by the dictionary's comparator; otherwise, they are generated in an arbitrary order. The start and end arguments specify the inclusive lower bound and exclusive upper bound of the keys to be processed (in the sense of the dictionary's comparator). They can provide additional efficiency when iterating over part of the dictionary if the dictionary is ordered. It is an error to mutate dict until after the generator is exhausted. When all the associations have been processed, returns an end-of-file object.