Chapter 52. lists
The lists library provides implementations for commonlyh used data structures, such as singly- and doubly-linked lists and rings, a stack and a queue.
dlist
Description
Type Tags
list, dlist
Object Value
Objects of type dlist have no value, and it is an error to try to get or set this value.
dlist.new()
Description
Prototype
dlist
.new
()
Parameters
None
Properties
Property | Type | Description |
---|---|---|
_ | type(*) | |
__ | type(*) | |
add | function | |
clear | function | |
count | integer | |
find | function | |
getfirst | function | |
getlast | function | |
head | dlistnode | |
insert | function | |
remove | function | |
search | function | |
tail | dlistnode | |
type | type |
Methods
add()
Description
Prototype
dlistvar
.add
(
dlist
,
dlistnode me
)
t1
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | dlist | |
t1 | None | dlistnode |
clear()
Description
Prototype
dlistvar
.clear
(
dlist
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | dlist |
find()
Description
Prototype
dlistvar
.find
(
dlist
,
dlistnode me
)
t
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | dlist | |
t | None | dlistnode |
getfirst()
Description
Prototype
dlistvar
.getfirst
(
dlist
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | dlist |
getlast()
Description
Prototype
dlistvar
.getlast
(
dlist
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | dlist |
insert()
Description
Prototype
dlistvar
.insert
(
dlist
,
dlistnode me
,
dlistnode t1
)
after
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | dlist | |
t1 | None | dlistnode | |
after | None | dlistnode |
remove()
Description
Prototype
dlistvar
.remove
(
dlist
,
dlistnode me
)
t
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | dlist | |
t | None | dlistnode |
search()
Description
Prototype
dlistvar
.search
(
dlist
,
type(*) me
)
keyval
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | dlist | |
keyval | None | type(*) |