-
-
Save devn/46b4f7a871e1ac0d5b9a to your computer and use it in GitHub Desktop.
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
(defprotocol EnvMap | |
(get [map key] [map key not-found])) | |
(extend-protocol EnvMap | |
java.util.Collections$UnmodifiableMap | |
(get ([map key] | |
(clojure.core/get (keywordize-keys (into {} map)) | |
(-> key name .toUpperCase keyword))) | |
([map key not-found] | |
(clojure.core/get (keywordize-keys (into {} map)) | |
(-> key name .toUpperCase keyword) | |
not-found)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment