DList.removeBack

Removes the front or back element.

Precondition: !empty

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

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