But we should mention that recursive data structures that contain refs are a bit of a code-smell. Your structures are no longer immutable if they contain refs which are mutable containers for immutable data. Something to think about.
On Thu, Mar 31, 2016 at 9:53 AM, James Reeves <ja...@booleanknot.com> wrote: > On 31 March 2016 at 16:39, hiskennyness <kentil...@gmail.com> wrote: > >> In porting my modelling library Cells to Clojure I managed to get a stack >> overflow when the printer tried to print a recursive data structure* I have >> used in the Common Lisp version. >> >> * Basically, a ref holds a map in which some values are maps in which >> some values are the ref. >> >> In Lisp we have *print-depth* as well as *print-length* to deal with just >> this case. >> >> Is there some way I can deal with this, or are recursive data structures >> not really supported by Clojure? >> > > The same variables exist in Clojure: *print-level* and *print-length* > respectively. > > - James > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.