Category talk:Wren-llist: Difference between revisions

m
→‎Source code: Fixed syntax highlighting.
(→‎Source code: Removed type aliases which are no longer needed.)
m (→‎Source code: Fixed syntax highlighting.)
Line 13:
For various reasons (efficient indexing, smaller memory footprint, more cache friendly) dynamic arrays tend to be preferred to linked lists nowadays and it is not expected that this module will see much use outside of RC particularly as it is written entirely in Wren whereas the built-in List class is written mostly in C. Consequently, only limited effort has been made to optimize the implementation.
===Source code===
<langsyntaxhighlight lang=ecmascript>/* Module "llist.wren" */
 
/* Node is a building block for a singly linked list. As such it consists of two fields:
Line 981:
// Returns the string representation of the current instance.
toString { "[" + toList.join(" <-> ") +"]" }
}</langsyntaxhighlight>
9,476

edits