Skip to content

Instantly share code, notes, and snippets.

@werbitt
Created September 15, 2012 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save werbitt/3729077 to your computer and use it in GitHub Desktop.
Save werbitt/3729077 to your computer and use it in GitHub Desktop.
Clojure Arity Issue
user=> (defn f [& ks]
#_=> (let [ms [{:a "abc" :b "123"} {:a "def" :b "456"}]]
#_=> (if ks
#_=> (map (fn [x] (select-keys x ks)) ms)
#_=> (ms))))
#'user/f
user=> (f :b)
({:b "123"} {:b "456"})
user=> (f)
ArityException Wrong number of args (0) passed to: PersistentVector clojure.lang.AFn.throwArity (AFn.java:437)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment