            return nil
        }
        self.bufferStartIndex = self.indexSucceeding(index: self.bufferStartIndex)
        self.isEmpty = (self.bufferStartIndex == self.bufferEndIndex)
        return first
    }
    
    // pushes element onto the end of the queue. If the queue is full, this
    // will pop off and return the oldest element. Otherwise, it will return nil
    @discardableResult
    public mutating func push(element: Element) -> Element? {
        let popped: Element?
        if self.isFull {