Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Clojure Programming/Examples/API Examples/Variable Definition

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

def user=> (def x 4) #'user/x user=> x 4 user=> (def y '(\a :b "c")) #'user/y user=> y (\a :b "c") user=> (def z (fn[] 3)) #'user/z user=> (z) 3 binding user=> (def x 1) #'user/x user=> (def y 2) #'user/y user=> (def get-x-y (fn [] (list x y))) #'user/get-x-y user=> (get-x-y) (1 2) user=> (binding [x 100 y 200] (get-x-y)) (100 200) user=> (get-x-y) (1 2)