;; there is no tuple type: several results are returned in a vector
(defn get-first-last [coll]
(if (seq coll)
[(first coll) (last coll)]
[-1 -1]))
;; destructuring unpacks the vector at the call site
(let [[fst lst] (get-first-last [2 3 5])]
(println "first is" fst)
(println "last is" lst))
;; a map is returned when the parts deserve names
(defn get-bounds [coll]
{:min (apply min coll) :max (apply max coll)})
(let [bounds (get-bounds [2 3 5])]
(println "min is" (:min bounds) "max is" (:max bounds)))