Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
Created April 4, 2017 09:14
Show Gist options
  • Save sw-samuraj/a219f596786ac16b930ee6b936ff0708 to your computer and use it in GitHub Desktop.
Save sw-samuraj/a219f596786ac16b930ee6b936ff0708 to your computer and use it in GitHub Desktop.
An example of currying in Clojure with more parameters at once, for a blog post.
(defn spicy [first second third]
(println "I like food with" first "," second "and" third "."))
(def curry-and-chilli
(partial spicy "curry" "curry" "chilli"))
(curry-and-chilli)
;; -> I like food with curry , curry and chilli .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment