About Programming - 2


Clojure has really nice syntax for specifying values, symbols and bindings.



Symbols, Bindings & Scope

We can define bindings that are valid for the entire program.

(def pi 3.1415)

Sometimes, we want a binding to exist with a limited duration.

; Two bindings are created, but they
; are only valid within the (let ...)
; block.
(let [first-name "Albert"
      last-name "Einstein"]

Ken Pu
Monday, Apr 2, 2018

comments powered by Disqus