Doubly-linked list/Definition: Difference between revisions

m
Line 3,433:
(print-it dl)
 
(display "insertion after the second element: ")
(dllist-insert-after! (dllist-next (dllist-next dl)) 15)
(print-it dl)
 
(display "insertion before the second from last element: ")
(dllist-insert-before! (dllist-prev (dllist-prev dl)) 45)
(print-it dl)
Line 3,465:
insertion after the root: 5 10 20 30 40 50
insertion before the root: 5 10 20 30 40 50 55
insertion after the second element: 5 10 15 20 30 40 50 55
insertion before the second from last element: 5 10 15 20 30 40 45 50 55
removal of the element 30: 5 10 15 20 40 45 50 55
any node can be used for the generator: 5 10 15 20 40 45 50 55
conversion to a list: (5 10 15 20 40 45 50 55)
conversion from a list: "a" "b" "c"</pre>
 
 
=={{header|Swift}}==
1,448

edits