message: optimise ringbuffer
diff: import * as L from "../../List"
  +import { DoublyLinkedList } from "../DublyLinkedList"
  export class RingBuffer<T> {
  - private values = L.empty<T>()
  + private values = new DoublyLinkedList<T>()
  constructor(readonly size: number) {}
  push(value: T) {
  if (this.values.length >= this.size) {
  - this.pop()
  + this.values.shift()
  }
  - this.values = L.append_(this.values, value)
  + this.values.add(value)
  return this.values
  }
  pop() {
  - this.values = L.drop_(this.values, 1)
  + this.values.pop()
  return this.values
  }
  - popHead() {
  - this.values = L.dropLast_(this.values, 1)
  - return this.values
  - }
  -
  - get list() {
  - return this.values
  + get list(): L.List<T> {
  + const l = L.emptyPushable<T>()
  + this.values.forEach((t) => {
  + L.push(t, l)
  + })
  + return l
  }
  }
  