stuck in eval..
Posted: Sat Jun 16, 2007 6:15 pm
Hi Lutz,
Im confused currently why the code below does not work..
Actualy what I want is to replace inside a nexted-list a variable
if use 'REF for this and it returns ( 9 2 4 2). I also use 'ref because
'ref is the only function that returns an index from a nested list.
Oke now I have a list containing the indexes.. But only net-set and set-nth can
work with nested lists... right?..
(i could not get 'replace to fix it..)
So if I want to use 'set-nth/nth-set im doing this, but set-nth doesn't eat it... ->
>(setq x (cons 'YY (ref 'XX 'YY)))
(YY 9 2 4 2)
> x
(YY 9 2 4 2)
>(set-nth x 'QQ)
value expected in function set-nth : x
If set-nth is unable to evaluate the index-x how do I replace
inside a nested-list an index found with 'ref?
Regards, Norman.
Im confused currently why the code below does not work..
Actualy what I want is to replace inside a nexted-list a variable
if use 'REF for this and it returns ( 9 2 4 2). I also use 'ref because
'ref is the only function that returns an index from a nested list.
Oke now I have a list containing the indexes.. But only net-set and set-nth can
work with nested lists... right?..
(i could not get 'replace to fix it..)
So if I want to use 'set-nth/nth-set im doing this, but set-nth doesn't eat it... ->
>(setq x (cons 'YY (ref 'XX 'YY)))
(YY 9 2 4 2)
> x
(YY 9 2 4 2)
>(set-nth x 'QQ)
value expected in function set-nth : x
If set-nth is unable to evaluate the index-x how do I replace
inside a nested-list an index found with 'ref?
Regards, Norman.