Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
# Insert an element X at position Pos
|
||||
(de 2insert (X Pos DLst)
|
||||
(let (Lst (nth (car DLst) (dec (* 2 Pos))) New (cons X (cadr Lst) Lst))
|
||||
(if (cadr Lst)
|
||||
(con (cdr @) New)
|
||||
(set DLst New) )
|
||||
(if (cdr Lst)
|
||||
(set @ New)
|
||||
(con DLst New) ) ) )
|
||||
|
||||
(setq *DL (2list 'A 'B)) # Build a two-element doubly-linked list
|
||||
(2insert 'C 2 *DL) # Insert C at position 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue