Singly-linked list/Element definition: Difference between revisions

m
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="ecmascriptwren">import "./llist" for Node
 
var n1 = Node.new(1)
9,485

edits