Created
April 4, 2017 09:14
-
-
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.
This file contains hidden or 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
(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