Re: core.match: order of patterns

2015-01-29 Thread Carlo Zancanaro
On Thu, Jan 29, 2015 at 10:46:45AM +, László Török wrote: > One thing that isn't obvious to me, how it should work when matching more > than one pattern. I can't seem to find it anywhere in the core.match wiki, but I'm fairly sure it tries them in order, returning the first one that matches.

core.match: order of patterns

2015-01-29 Thread László Török
Hi, I started experimenting with core.match. One thing that isn't obvious to me, how it should work when matching more than one pattern. In the following example, the expression returns 3 or 4 depending on which pattern comes first: (require '[clojure.core.match :as cm]) (cm/match [:a true fal