Suppose I have a list
(1 2 3 4 5 6 7 8 9 10) and I'd like to change the seventh element to a value
e.g. 10. So that the result looks like this: (1 2 3 4 5 6 10 8 9 10)
What is the best way to do this since there is no function like
setnth ...
Best regards
Ralf
--
no signature
n=7
a='(1 2 3 4 5 6 7 8 9 10)
rplaca(nthcdr(sub1(n) a) 10)
Note that rplaca is a destructive operation - so it changes the list
in situ.
Regards,
Andrew.
--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
Thanks Andrew!
Best regards
Ralf