clojure Pattern Matching with core.match Matching a Vector


Example

(let [v [1 2 3]]
  (match [v]
    [[1 1 1]] :a0
    [[1 _ 1]] :a1
    [[1 2 _]] :a2))  ;; _ is used for wildcard matching

;=> :a2