Logo

Programming-Idioms

History of Idiom 3 > diff from v9 to v10

Edit summary for version 10 by :

Version 9

2015-09-03, 12:55:37

Version 10

2015-09-03, 13:26:34

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Code
(defn main- [& args]
  (println "I got all this arguments " args " and now I'm returning nil. Peace out!"))
Comments bubble
The syntax "& args" in the arguments vector means this function can take any number of arguments.
Doc URL
http://clojuredocs.org/clojure.core/defn