[MATCH-43] Vector pattern - unreachable clause Created: 10/Dec/11 Updated: 28/Jul/13 Resolved: 27/Dec/11
|Reporter:||Benny Tsai||Assignee:||David Nolen|
Clojure 1.3, core.match 0.2.0-alpha8
This is the simplest example I could come up with:
(defn f [xs]
[:a] and [:b b] can be matched with no problems, but [:c] can't be matched for some reason:
user=> (f [:a])
|Comment by David Nolen [ 12/Dec/11 9:24 PM ]|
This will have to wait for http://dev.clojure.org/jira/browse/MATCH-31. There are some deeper issues with vector pattern matching that need to get ironed out first.
In the meantime just put your [:c] test above [:b b]. The key idea is to keep vector patterns of the same size "together".
|Comment by David Nolen [ 27/Dec/11 8:23 PM ]|