Created
December 19, 2013 08:17
-
-
Save laurentpetit/8036025 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
;; What do you prefer? | |
(def options {:option-1 SomeClass/OPTION_1}) | |
(defn foo [ option ] | |
(if (keyword? option) | |
(options option) | |
option)) | |
;; Or | |
(def options {:option-1 SomeClass/OPTION_1, SomeClass/OPTION_1 SomeClass/OPTION_1}) | |
(defn foo [ option ] (options option)) |
I also prefer the second one.
and I really don't know why I just didn't think about (options option option), only reason may be everything seems fuzzy today ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I prefer the 2nd option over the 1st one bu what about (options option option)?