;; a parameter cannot be changed in Clojure: the values are immutable
;; and the name is bound only inside the call.
;; a function returns a new value instead of editing the old one
(defn cut5 [data]
(if (> (count data) 5)
(subs data 0 5)
data))
(def data "1234567")
(println (cut5 data))
;; prints "12345"
(println "the argument is untouched:" data)
;; data is still "1234567"