Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (20 sloc) 0.588 kB
; Strings just like java
"hello world"
; Print a string
(println "hello world")
; Create a function to print
(defn say-hello [] (println "hello world"))
; and call the function
; A function with an argument
(defn say-it [msg] (println msg))
; Create a text file hello.clj with
(println "hello world")
; Run it with clj hello.clj
; Clojure strings are java strings...
(.toUpperCase "hello world")
; Programming logic
(if (> 10 11) "bigger" "smaller")
; Programming logic in a function
(defn bigger? [a b] (if (> a b) "bigger" "smaller"))
; Back to slides...
Jump to Line
Something went wrong with that request. Please try again.