|
|
|
|
|
by frio
5302 days ago
|
|
Just for my own sanity - is "multimethod" another term for a form of pattern matching? Looking at the clojure code, it strongly reminds me of Haskell: encounter :: Species -> Species -> Result
encounter (Bunny _) (Lion _) = RunAway
encounter (Lion _) (Bunny _) = Eat
etc. Of course, pseudocode, syntax errors, whatever - but it looks to be the same idea?edit - formatting |
|