Building immutable objects with Scala and Clojure