Clojure def
Top-level
(def cats 10)
Invoke function-specify name and passing arguments for each parameter.
(def five (add 2 3))
Busy Baboon
Top-level
(def cats 10)
Invoke function-specify name and passing arguments for each parameter.
(def five (add 2 3))
;; 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))