3 ms·
Clojure seems to tackle this problem by having different "iterable" data types (lists, hashes, vectors), but having them implement a common interface that allow
by jimbokun 18y ago
Clojure seems to tackle this problem by having different "iterable" data types (lists, hashes, vectors), but having them implement a common interface that allows many functions to operate on all of them.
- lacker 18y agoI think Clojure does this well; this solution pretty much requires that every collection is a full-fledged object, though, which is why I can't see it going into Arc. Maybe you could special-case lists and hash tables.