Arc Forumnew | comments | leaders | submitlogin
7 points by pg 6140 days ago | link | parent

You can make them (and all kinds of other circular structures) but there's currently no way of printing them out. Fixing that is not a top priority. There are plenty of things you don't want to print in the repl, like million-item lists. So in the repl the way to deal with this is by using e.g. (do1 t ...).

I admit it's a problem if you explicitly want to print a circular list, e.g. to store it in a file. But in my experience that is rare.



1 point by absz 6140 days ago | link

I know that mzscheme has a method for printing out circular lists:

  > (define x '(1))
  > (set-cdr! x x)
  > x
  #0=(1 . #0#)
I'm sure there's a good reason that Arc can't just leverage it, but what is said reason?

-----

3 points by pg 6139 days ago | link

Actually it probably just got lost somewhere in converting from nil-terminated lists.

-----