Hacker News new | ask | show | jobs
by wtetzner 1114 days ago
Clojure's lists are effectively cons cells. Clojure's vectors and maps are immutable hash array map tries.

    => (class (read-string "(some list)"))
    clojure.lang.PersistentList
They are written in Java, and implement a bunch of interfaces, so the implementation looks complicated, but they are basically just classes with _first and _rest fields.

https://github.com/clojure/clojure/blob/master/src/jvm/cloju...