Created
February 1, 2013 18:26
-
-
Save daviddpark/4693104 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
;; Here is the function definition I am trying to use, from | |
;; https://github.com/ptaoussanis/carmine/blob/master/src/taoensso/carmine.clj: | |
(defn make-conn-spec | |
[& {:keys [host port password timeout db] | |
:or {host "127.0.0.1" port 6379 password nil timeout 0 db 0}}] | |
{:host host :port port :password password :timeout timeout :db db}) | |
;; I have read about destructuring both in clojure.org special forms | |
;; and in the Joy of Clojure book, but I can't wrap my head around | |
;; how to invoke this function. | |
;;I have tried invoking this function to get something other than the default return value of: | |
{:host "127.0.0.1" :port 6379 :password nil :timeout 0 :db 0} | |
;; ...to no avail. I have tried passing in a map: | |
(make-conn-spec {:host "example.com" :port 9999 :password "insecure" :timeout 900 :db 1}) | |
;; I have tried passing in arguments: | |
(make-conn-spec "example.com" 9999 "insecure" 900 1) | |
;; I have tried a ridiculous map: | |
(make-conn-spec {"host" "example.com" "port" 9999 "password" "insecure" "timeout" 900 "db" 1}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment