2 ms·
You can actually do that in Lisp. Lisp code is commonly thought of as a tree, but it is really a bunch of linked lists. The links can be arranged in any way you
by db48x 5y ago
You can actually do that in Lisp. Lisp code is commonly thought of as a tree, but it is really a bunch of linked lists. The links can be arranged in any way you want.
http://www.lispworks.com/documentation/HyperSpec/Body/02_dhp.htm http://www.lispworks.com/documentation/HyperSpec/Body/02_dhp...
The example shows this with some made–up data, but you can use it with arbitrary code as well. It is very easy to use it to create circular lists, which when executed are infinite loops.
Naturally the only sane thing to do is to keep your code strictly a tree.