The doubly-linked-list Reference Manual

This is the doubly-linked-list Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 16:18:56 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 doubly-linked-list

An implementation of the doubly linked list data structure.

Author

Michael Fiano <>

Home Page

https://git.mfiano.net/mfiano/doubly-linked-list

License

MIT

Version

0.1.0

Dependency

mfiano-utils (system).

Source

doubly-linked-list.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 doubly-linked-list/doubly-linked-list.asd

Source

doubly-linked-list.asd.

Parent Component

doubly-linked-list (system).

ASDF Systems

doubly-linked-list.


3.1.2 doubly-linked-list/package.lisp

Source

doubly-linked-list.asd.

Parent Component

doubly-linked-list (system).

Packages

doubly-linked-list.


3.1.3 doubly-linked-list/doubly-linked-list.lisp

Dependency

package.lisp (file).

Source

doubly-linked-list.asd.

Parent Component

doubly-linked-list (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 doubly-linked-list

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: delete (list object &key key test from-end)

Delete an object from the doubly linked list ‘LIST‘.

‘OBJECT‘ can be either a NODE object, or some value that is stored in the value of a NODE object. In the case of a non-NODE value, the list is searched linearly for a matching node before deletion occurs. Returns two values, the modified list, and a boolean specifying if a node was deleted.

‘KEY‘ specifies a function that is called with ‘OBJECT‘ as its only argument, if ‘OBJECT‘ is not of type node. It defaults to ‘#’IDENTITY‘. This argument has no effect if ‘OBJECT‘ is of type NODE.

‘TEST‘ specifies a function used to compare the value of ‘OBJECT‘ as it traverses nodes in the list. It defaults to ‘#’EQL‘. This argument has no effect if ‘OBJECT‘ is of type NODE.

Note: As specified above, this function traverses the list linearly for an object to delete if ‘OBJECT‘ is not a NODE.

Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Function: find (list value &key start end key test from-end)

Search for a node with the given ‘VALUE‘ in the doubly linked list ‘LIST‘.

‘START‘ and ‘END‘ are NODE objects to begin and end searching, inclusively.

‘KEY‘ specifies a function that is called with ‘VALUE‘ as its only argument. It defaults to ‘#’IDENTITY‘.

‘TEST‘ specifies a function used to compare the‘VALUE‘ as it traverses nodes in the list. It defaults to ‘#’EQL‘.

‘FROM-END‘, when specified, traverses the list in reverse, from tail to head.

Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Reader: head (instance)
Writer: (setf head) (instance)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Target Slot

head.

Function: insert (list value &key target where)

Insert a new node into the doubly linked list ‘LIST‘, constructed to hold ‘VALUE‘.

‘TARGET‘ is an existing node to place the new node adjacent to. If ‘TARGET‘ is NIL, the head is implicitly targetted.

‘WHERE‘ can be either ‘:BEFORE‘ or ‘:AFTER‘, and specifies on which side of the target node to insert the new node. If unspecified, defaults to ‘:AFTER‘.

Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Function: length (list)

Return the number of elements in the doubly linked list ‘LIST‘.

Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Function: list-values (list)

Convert the doubly-linked list ‘LIST‘ into a Lisp list of its nodes’ values.

Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Function: make-list (&rest values)

Create a new doubly linked list, optionally pre-populated with ‘VALUES‘.

Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Reader: next (instance)
Writer: (setf next) (instance)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Target Slot

next.

Reader: previous (instance)
Writer: (setf previous) (instance)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Target Slot

previous.

Reader: tail (instance)
Writer: (setf tail) (instance)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Target Slot

tail.

Reader: value (instance)
Writer: (setf value) (instance)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Target Slot

value.


5.1.2 Standalone methods

Method: print-object ((node node) stream)
Source

doubly-linked-list.lisp.

Method: print-object ((list list) stream)
Source

doubly-linked-list.lisp.


5.1.3 Structures

Structure: list

A doubly linked list that holds sequential nodes which have links to their previous and next node.

Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: head
Readers

head.

Writers

(setf head).

Slot: tail
Readers

tail.

Writers

(setf tail).

Slot: %length
Type

fixnum

Initform

0

Readers

%length.

Writers

(setf %length).

Structure: node

A doubly linked list node with references to its previous and next node.

Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: value
Readers

value.

Writers

(setf value).

Slot: previous
Readers

previous.

Writers

(setf previous).

Slot: next
Readers

next.

Writers

(setf next).


5.2 Internals


5.2.1 Ordinary functions

Reader: %length (instance)
Writer: (setf %length) (instance)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Target Slot

%length.

Function: %make-list (&key head tail %length)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Function: make-node (&key value previous next)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.

Function: node-p (object)
Package

doubly-linked-list.

Source

doubly-linked-list.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
D   F   H   I   L   M   N   P   T   V  
Index Entry  Section

%
%length: Private ordinary functions
%make-list: Private ordinary functions

(
(setf %length): Private ordinary functions
(setf head): Public ordinary functions
(setf next): Public ordinary functions
(setf previous): Public ordinary functions
(setf tail): Public ordinary functions
(setf value): Public ordinary functions

D
delete: Public ordinary functions

F
find: Public ordinary functions
Function, %length: Private ordinary functions
Function, %make-list: Private ordinary functions
Function, (setf %length): Private ordinary functions
Function, (setf head): Public ordinary functions
Function, (setf next): Public ordinary functions
Function, (setf previous): Public ordinary functions
Function, (setf tail): Public ordinary functions
Function, (setf value): Public ordinary functions
Function, delete: Public ordinary functions
Function, find: Public ordinary functions
Function, head: Public ordinary functions
Function, insert: Public ordinary functions
Function, length: Public ordinary functions
Function, list-values: Public ordinary functions
Function, make-list: Public ordinary functions
Function, make-node: Private ordinary functions
Function, next: Public ordinary functions
Function, node-p: Private ordinary functions
Function, previous: Public ordinary functions
Function, tail: Public ordinary functions
Function, value: Public ordinary functions

H
head: Public ordinary functions

I
insert: Public ordinary functions

L
length: Public ordinary functions
list-values: Public ordinary functions

M
make-list: Public ordinary functions
make-node: Private ordinary functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods

N
next: Public ordinary functions
node-p: Private ordinary functions

P
previous: Public ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods

T
tail: Public ordinary functions

V
value: Public ordinary functions