Skip to content

Instantly share code, notes, and snippets.

@ninjudd
Created December 6, 2012 23:05
Show Gist options
  • Save ninjudd/4229303 to your computer and use it in GitHub Desktop.
Save ninjudd/4229303 to your computer and use it in GitHub Desktop.
clojure.core.match bug?
(require '[clojure.core.match :refer [match]])
(defn edge-keyseq-id [keyseq]
(match keyseq
[_ :edges edge-id & _] edge-id))
(edge-keyseq-id ["foo" :edges "bar"])
;; => "bar"
(edge-keyseq-id ["foo" "bar"])
;; IndexOutOfBoundsException clojure.lang.RT.subvec (RT.java:1462)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment