“Clojure def” Code-Antworten

Clojure def

Top-level 
(def cats 10)
Invoke function-specify name and passing arguments for each parameter.
(def five (add 2 3))
Busy Baboon

Clojure Def

;; 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))
Busy Baboon

Ähnliche Antworten wie “Clojure def”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen