[plt-scheme] for-each on a collection object members
fold is the universal iterator, from while all other iterations can be
derived. So implement fold and the rest is easy.
[It's actually not that simple, but to a first approximation it will do.]
N.
On Jan 8, 2008 11:53 AM, Stephen De Gabrielle <spdegabrielle at gmail.com> wrote:
> Hi,
>
> [Please excuse me if this is a silly question]
>
> I want to 'map' or 'for-each' of a collection object which is a
> collection of other objects, in the same way as I would over a regular
> list (also filter from the list.ss List Utilities)
>
> I can just turn the collection of objects into a list of objects, but
> it seems there might be a better way? 'for-each-object-on-collection
> object