Created
April 18, 2015 18:01
-
-
Save ivar/4c4f767cf2f6279cf404 to your computer and use it in GitHub Desktop.
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 greeting | |
([] (greeting "World")) | |
([msg] (str "Hello, " msg exclamation )) | |
([msg1, msg2](str msg1 ", " msg2 exclamation )) | |
) | |
(greeting "Good morning" "Clojure") | |
;; For testing | |
(assert (= "Hello, World!" (greeting))) | |
(assert (= "Hello, Clojure!" (greeting "Clojure"))) | |
(assert (= "Good morning, Clojure!" (greeting "Good morning" "Clojure"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment