Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 62c2706eb6
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (11 sloc) 0.614 kB
<p>Congratulations - you just defined your first Clojure function. Many more will follow!</p>
<code>defn</code> takes the name of the function, then the list of arguments, and then the body of the function.
I told you that a Clojure program is made of lists, right?
The entire <code>defn</code> is a list, and the function body is also a list.
(Even the arguments are collected in a vector, which is similar to a list - we'll talk about vectors soon).
Oh, sorry for talking so long - you probably want to try out your brand new function!
Type <code class="expr">(square 10)</code>.
Jump to Line
Something went wrong with that request. Please try again.