4 ms·
Or in Lisp one could write #1=(1 . #1#), eg: CL-USER> (subseq '#1=(1 2 3 . #1#) 0 10) (1 2 3 1 2 3 1 2 3 1)
by kbp 10y ago
Or in Lisp one could write #1=(1 . #1#), eg:
CL-USER> (subseq '#1=(1 2 3 . #1#) 0 10)
(1 2 3 1 2 3 1 2 3 1)
- foldr 10y agoAh that's interesting. I was going to say that in principle a strict language could have a special syntax for defining circular data structures, but I didn't know about that particular corner of CL.