Skip to content

Instantly share code, notes, and snippets.

@ztellman
Last active June 3, 2025 15:33
Show Gist options
  • Save ztellman/c29ff10ab033d385812f8716afd09978 to your computer and use it in GitHub Desktop.
Save ztellman/c29ff10ab033d385812f8716afd09978 to your computer and use it in GitHub Desktop.
user> (defn foo [a & {:keys [b c d]}]
(+ a b c d))
#'user/foo
user> (foo 1 {:b 2 :c 3 :d 4})
Execution error (IllegalArgumentException) at user/foo (form-init9656087236109608629.clj:43).
No value supplied for key: {:b 2, :c 3, :d 4}
user> (foo 1 :b 2 :c 3 :d 4)
10
user> (apply foo 1 (apply concat {:b 2 :c 3 :d 4}))
10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment