Singly-linked list/Element definition: Difference between revisions
Singly-linked list/Element definition (view source)
Revision as of 11:39, 6 February 2024
, 4 months ago→{{header|Wren}}: Minor tidy
imported>Chinhouse |
m (→{{header|Wren}}: Minor tidy) |
||
Line 2,018:
{{libheader|Wren-llist}}
The Node class in the above module is the element type for the LinkedList class which is a generic singly-linked list. The latter is implemented in such a way that the user does not need to deal directly with Node though for the purposes of the task we show below how instances of it can be created and manipulated.
<syntaxhighlight lang="
var n1 = Node.new(1)
|