5 ms·
> for example there is not one mapping procedure for lists and another mapping procedure for arrays. In Common Lisp, MAP works just as well on either.
by kbp 10y ago
> for example there is not one mapping procedure for lists and another mapping procedure for arrays.
In Common Lisp, MAP works just as well on either.
- brudgers 10y agoIn Clojure map also works on hashes and sets. In keeping with the previous discussion, there's also only one variety of map in Clojure. It's this orthogonality of operations and datatypes that I think is Clojure going in the right direction. None of which is to say that Clojure isn't standing on the shoulders of giants.
- kbp 10y agoYou might be interested in the FSet library (among others): https://common-lisp.net/project/fset/Site/index.html https://common-lisp.net/project/fset/Site/index.html
- thomasvarney723 10y agoVery well said. The advent of transducers in Clojure has made this 'orthogonality' especially true.
- qwertyuiop924 10y ago...And us schemers have the TinyCLOS derivatives, so our map could work on any DS: by default, however, it doesn't :-(.