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.
extending nested lists
extending nested lists
-- (define? (Cornflakes))
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:
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.
nesting of lists can be as deep as you want:
Code: Select all
> (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
(((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))
>
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.
Last edited by Lutz on Fri Feb 09, 2007 1:59 pm, edited 1 time in total.