Doubly-linked list/Element definition: Difference between revisions
Doubly-linked list/Element definition (view source)
Revision as of 09:50, 8 January 2018
, 6 years ago→{{header|PicoLisp}}
(→{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details) |
|||
Line 651:
With that, 'cddr' can be used to access the next, and 'cadr' to access the
previous element.
<lang PicoLisp>
(de
(let L (car DLst) # Get current data list
(set DLst (cons X NIL L)) # Prepend two new cons pairs
Line 660:
# We prepend 'not' to the list in the previous example
(
For output of the example data, see [[Doubly-linked list/Traversal#PicoLisp]].
|