5 ms·
I don't really get what the author is claiming... I would have code his `if-mathch` in a simpler way in clojure: (case (f data-structure) 0 (do-some
by siscia 12y ago
I don't really get what the author is claiming...
I would have code his `if-mathch` in a simpler way in clojure:
(case (f data-structure)
0 (do-something)
1 (do-something-else)
(do-default))
Where `f` can be a function defined in a protocol or a multimethod, so you can actually implement your own `f` for any data structure you like.
Now, what I am missing ?