Guile Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheme style auto-resizing hashtable (fwd)





I do think it's useful to be able to store a pointer into a list (or
hash-table or whatever), for later use.
With map, and for-each etc you have to process the whole lot there and
then.

BTW, a question for CLOS people - does CLOS have a way to iterate over
various data structures
in a consistent way? Like is there a map and for-each that works with
lists, vectors, and hash-tables etc etc?

If I am using tiny-clos and I want such a thing, what would be the right
way to do it? Would it be to redefine map and for-each to be a generic
function, or would it be to write something else like (map-generic) and
(for-each-generic)?



>Per Bothner <bothner@cygnus.com> writes:
>
 >> > Iterators are very un-Schemely, IMO, Scheme is not in the business of
 > > >telling you how to iterate.
 >>
 >> What a strange statement!  What do you think map and for-each are?
 >
>I believe the distinction was btw iterators (as in overloading + in
>C++) & mappers (as in map, for-each, ...).

--
Harvey J. Stein
BFM Financial Research
hjstein@bfr.co.il





Guile Home | Main Index | Thread Index