Last active
April 4, 2017 09:08
-
-
Save sw-samuraj/1542b459b1f1f0db36bd083cc52d20e7 to your computer and use it in GitHub Desktop.
An example of currying on Clojure for a blog post.
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
(defn spicy [first second third] | |
(println "I like food with" first "," second "and" third ".")) | |
(def curry (partial spicy "curry")) | |
(def more-curry (partial curry "curry")) | |
(def curry-and-chilli (partial more-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