“CLOJURE DEFN” Kode Jawaban

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

Def Clojure

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

Jawaban yang mirip dengan “CLOJURE DEFN”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya