Arc Forumnew | comments | leaders | submitlogin
cyclic structure
2 points by tjw 6404 days ago | 1 comment
When trying to create a cyclic data structure, Arc goes into an infinite loop:

arc> (= a '(1 2)) (1 2) arc> (= (cddr a) a)

In ac.scm, ac-denil only considers tree like structures.



1 point by parenthesis 6404 days ago | link

It's okay so long as you don't try to print a circular list:

  arc> (= a '(1 2))
  (1 2)
  arc> (do (= (cddr a) a) t)
  t
  arc> (pop a)
  1
  arc> (pop a)
  2
  arc> (pop a)
  1
  arc> (pop a)
  2

-----