Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CLOJURE

Clojure defn

;; defn defines a named function:
;; The defn macro defines a function taking zero or more arguments.
;; Any number of parameters may beinclude
;; name params body
;; _____ _____ ___________________________
;; (defn greet [name] (str "Hello," name))

   (defn add [x,y]    (+ x y))
 
PREVIOUS NEXT
Tagged: #Clojure #defn
ADD COMMENT
Topic
Name
5+5 =