Doubly-linked list/Element definition: Difference between revisions
Content added Content deleted
(Added XPL0 example.) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 1,058: | Line 1,058: | ||
{{libheader|Wren-llist}} |
{{libheader|Wren-llist}} |
||
The DNode class in the above module is the element type for the DLinkedList class which is a generic doubly-linked list. The latter is implemented in such a way that the user does not need to deal directly with DNode though for the purposes of the task we show below how instances of it can be created and manipulated. |
The DNode class in the above module is the element type for the DLinkedList class which is a generic doubly-linked list. The latter is implemented in such a way that the user does not need to deal directly with DNode though for the purposes of the task we show below how instances of it can be created and manipulated. |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">import "./llist" for DNode |
||
var dn1 = DNode.new(1) |
var dn1 = DNode.new(1) |