anchor.diff:      (if (>= n (length history))
           (error 'pstream-out-of-range :index n)
           (elt-wrap history n))))
  -
  -(defun pstream-nth-future (n pstream)
  -  "Obsolete alias for `pstream-elt-future'."
  -  (warn "~s is deprecated; use ~s instead." 'pstream-nth-future 'pstream-elt-future)
  -  (pstream-elt-future pstream n))
   
   (defun pstream-elt-future (pstream n)
     "Return the Nth element from PSTREAM's history, automatically advancing PSTREAM as necessary if the Nth element has not yet occurred.
  
positive.code:   (:report (lambda (condition stream)
               (format stream "The pstream has insufficient history to index to element ~d." (pstream-elt-index condition)))))
  
  (defun pstream-nth (n pstream)
    "Obsolete alias for `pstream-elt'."
    (warn "~s is deprecated; use ~s instead." 'pstream-nth 'pstream-elt)
    (pstream-elt pstream n))
  
  (defun pstream-elt (pstream n)
    "Return the Nth element from PSTREAM's history. Does not automatically advance PSTREAM if N is out of range.
  
  
negative.code: (defgeneric peek (pattern)
    (:documentation "\"Peek\" at the next value of a pstream, without advancing its current position.
  
  See also: `next', `peek-n', `peek-upto-n'"))
  
  (defun peek-n (pstream n)
    "Peek at the next N results of a pstream, without advancing it forward in the process.
  
  See also: `peek', `peek-upto-n', `next', `next-n'"
    (loop :repeat n
       :collect (peek pstream)))
  
  (defun peek-upto-n (pstream &optional (n *max-pattern-yield-length*))
    "Peek at up to the next N results of a pstream, without advancing it forward in the process.
  
  See also: `peek', `peek-n', `next', `next-upto-n'"
    (assert (integerp n) (n) "peek-upto-n's N argument must be an integer.")
    (loop :repeat n
       :for val = (peek pstream)
       :until (null val)
       :collect val))
  