Hacker News new | ask | show | jobs
by pharmakom 880 days ago
Immutable structures cannot be cyclical. Maybe I’m missing something?
2 comments

Exactly as nlitened mentioned, Clojure has a few difference reference types, which are boxes that hold pointers to more immutable values. The values within those boxes can be changed transactionally. This allows for cyclical references.
In Clojure, the data structures may usually contain references to mutable cells, which in turn may form cycles.