Singly-linked list/Element definition: Difference between revisions
Singly-linked list/Element definition (view source)
Revision as of 12:15, 12 November 2020
, 3 years ago→{{header|Wren}}: Rewrote this as the task is about element definition rather than the definition of the singly-linked list itself.
(Added Wren) |
(→{{header|Wren}}: Rewrote this as the task is about element definition rather than the definition of the singly-linked list itself.) |
||
Line 1,794:
=={{header|Wren}}==
{{libheader|Wren-llist}}
The
<lang ecmascript>import "/llist" for
var
n1.next = n2
System.print(["node 1", "data = %(n1.data)", "next = %(n1.next)"])
System.print(
{{out}}
<pre>
[node 1,
[node 2, data = 2, next = null]
</pre>
|