3 ms·
that means that the visitor pattern can be replaced with multiple dispatch (true) but neither map nor fmap imply that (and in fact many languages have the latte
by riffraff 14y ago
that means that the visitor pattern can be replaced with multiple dispatch (true) but neither map nor fmap imply that (and in fact many languages have the latter but not the former)
- chongli 14y agoClojure has both map and multimethods. It's trivial to map over a collection and dispatch to a different implementation for every element in the collection. With multiple collections, this extends to multiple dispatch over the corresponding elements in each collection.
- riffraff 14y agoI will rephrase myself: the original statement is you can do V with F to which the reply was no, you can't do V with F and the subsequent reply was but you can do V with M and I pointed out that F does not imply V. Your current reply is Clojure has both F and M and can do V which is obvious, since M implies V already, but still unrelated to what F can do.