Struct LinkedList

* NOTE: * We use and propose short prefixes for structure elements. This allows * simple specific search, or later replacement. You should use this for your * code too.

struct LinkedList(alias EHT, alias ENT) ;

A D implementation of a double-linked list

This is a minimalistic approach. No extra features. Just the the list. It can be embedded into any struct/class declaration.

The list uses a head and tail node. User nodes are placed between these two nodes. The empty list consists of just these two nodes.

Inner structs

NameDescription
LinkedListHead The List Header - simply two merged list nodes. * * The ListHead is the Head and Tail node in a single structure. * * /->Next # lh_Head : HEAD * | Prev Next (=PrevNext)= null # lh_Tail : HEAD TAIL * \------->Prev # lh_TailPred: TAIL * * Note: * - head and tail pointing to each other, but the head has no predessor * and the tail node has no successor. * - The lh_Tail is always 'null'. It aliases the ln_Pred of head and the * ln_Succ of the tail node.
LinkedListNode The List Node.