Created
January 22, 2015 03:39
-
-
Save tolitius/695e78e4e38a0400df21 to your computer and use it in GitHub Desktop.
testing for two error codes with types
This file contains hidden or 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
=> (def error-codes [[:code "ERROR" :type "title"] [:code "ERROR" :type "id"]]) | |
=> error-codes | |
[[:code "ERROR" :type "title"] [:code "ERROR" :type "id"]] | |
=> (let [[[_ c1 _ t1] [_ c2 _ t2]] error-codes] [(distinct [c1 c2]) #{t1 t2}]) | |
[("ERROR") #{"id" "title"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment