DList.removeFront

Removes the front or back element.

Precondition: !empty

  1. void removeFront()
    struct DList(T)
    void
    removeFront
    ()
  2. size_t removeFront(size_t howMany)
  3. void removeBack()

Examples

DList!int l;

l.insertFront(8);
l.insertFront(9);
assert(l.front == 9);
l.removeFront();
assert(l.front == 8);
l.removeFront();
assert(l.empty);
auto l = DList!int([9, 8]);

assert(l.back == 8);
l.removeBack();
assert(l.back == 9);
l.removeFront();
assert(l.empty);

Meta