lein uberjar- Execute with:
java -jar target/uberjar/<your-code.jar>
- Literal representations of data structs
- Operations
- (def randVar 10) : declare a long
- (def aDouble 1.233) : double
- (type false) | (type true) : Bool
- (nil) : Check no val
- defn
- Function name
- Docstring describing function
- Parameters in brackets
- Function body
(defn -main
"These are comments"
[& args]
(println "Hello World"))(str "Hi" "There" "Dude") : Concatenate (pos? 15) : Check positive (even? 26) (odd? 13) (number? num)
(if boolean-form
then-form
optional-else-form)(if true
(do (println "Do first")
"Then this")
(do (println "Else...")
("Do these")){:first-name "Charlie"
:last-name "MacDennis"}(hash-map :a 1 :b 2)
(get {:a 0 :b 1} :b)
; => 1[3 2 1]
(vector 3 2 1)'(1 2 3 4)#{"kurt" 30 :icicle}
(hash-set 1 1 2 2)