Created
December 6, 2012 23:05
-
-
Save ninjudd/4229303 to your computer and use it in GitHub Desktop.
clojure.core.match bug?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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