Hacker News new | ask | show | jobs
by siscia 4098 days 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 ?