New list

Purpose: Create linked list.

 new-list <list> [ process-scope ]

new-list initializes new linked <list>, where each element is connected to the previous and next ones.

In a linked <list> data that can be added anywhere in the list, and also accessed anywhere as well. Access to a list is sequential, meaning you can position to the first, last, next or previous element. Note that a list is accessible to the current process only.

Generally information is stored in a linked list, and retrieved (possibly many times) in any order later.

A list has a current position where an element can be read, updated, inserted or deleted (via read-list, write-list and delete-list), and this position can be explicitly changed with position-list.
Scope
A linked list is accessible to the current process only, unless "process-scope" clause is used, in which case all requests served by the process can use it (see do-once for a typical way to create an object with a process scope). If "process-scope" is used, then elements of the list will keep their value between requests in the same process.

See write-list for an example of a process-scoped list.
Examples
 new-list mylist

See also
Linked list
delete-list  
get-list  
new-list  
position-list  
purge-list  
read-list  
write-list  
See all
documentation


Copyright (c) 2019-2024 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.