Hello Lutz,
How difficult is it to extend the current depth of 16 to 256/512 for nested lists?
(..besides the difficulty, it probbaly would be a speed impact...)
Just currious..
regards, Norman.
There is no limit in nesting anymore for lists. The limit of 16 which existed for some functions in 9.0 is gone. Most of the index stuff was reworked in 9.0.11. Whatever you memory gives can be done:
nesting of lists can be as deep as you want:
> (set 'L '((((((((((((((((((((((((((((((((((((x)))))))))))))))))))))))))))))))))))))
((((((((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))))))))
> (set 'V (ref 'x L))
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0)
> (L V)
x
> (nth (L V))
x
> (nth-set (L V) 99)
x
> L
((((((((((((((((((((((((((((((((((((99))))))))))))))))))))))))))))))))))))
> (nth 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 L)
99
> (pop L V)
99
> L
(((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))
>
Lutz
ps: newLISP is the only LISP with this kind of support for indexed lists, other LISPS have to write complex recursive algorithms to achieve this.
HA! Fantastic ! ;-)