anchor.diff:                              (loop :for i :upto 200 :collect (= (peek pstr) (next pstr)))))
               "peek and next return the same values")
     (is (= 0
  -         (let ((pstr (as-pstream (pbind :dur 1/3 :foo (pseq '(1 2 3) 1)))))
  +         (let ((pstr (as-pstream (pbind :dur 1/3 :foo (pseq (list 1 2 3) 1)))))
              (peek pstr)
              (beats-elapsed pstr)))
         "beats-elapsed should not count peeked outputs"))
  
positive.code:       "pser's OFFSET argument works correctly with a pattern")
    (is (equal
         (list 1 1 0 0 2 2)
         (next-upto-n (pser '(0 1 2) :inf (pseq '(1 0) 3))))
        "pser's OFFSET argument works correctly with a finite pattern"))
  
  (test pk
    "Test pk"
    (is (equal
         (list 3)
         (gete (next-n (pbind :foo (pseq '(3) 1) :bar (pk :foo)) 1) :bar))
        "pk returns correct results")
    (is (equal
         (list 1 2 3 nil)
         (gete (next-n (pbind :foo (pseq '(1 2 3) 1) :bar (pk :foo)) 4) :bar))
        "pk returns correct results")
    (is (equal
         (list 2 2 2 nil)
         (gete (next-n (pbind :foo (pseq '(1 2 3) 1) :bar (pk :baz 2)) 4) :bar))
        "pk returns correct results when a default is provided and its KEY is not in the source")
    (is (=
         3
  
negative.code: (test pstutter
    "Test pstutter"
    (is (equal (list 1 1 1 2 2 2 3 3 3)
               (next-upto-n (pstutter (pseq (list 1 2 3) 1) 3)))
        "pstutter returns correct results")
    (is (equal (list 2 3 3)
               (next-upto-n (pstutter (pseq (list 1 2 3) 1) (pseq (list 0 1 2) 1))))
        "pstutter returns correct results when its N is a pattern, and when N is 0"))
  
  (test pdurstutter
    "Test pdurstutter"
    (is (equal (list 2 3/2 3/2)
               (next-upto-n (pdurstutter (pseq (list 1 2 3) 1) (pseq (list 0 1 2) 1))))
        "pdurstutter returns correct results for value patterns")
    (is (every-event-equal
         (list (event :foo 1 :dur 1)
               (event :foo 2 :dur 1/2)
               (event :foo 2 :dur 1/2))
         (next-upto-n (pdurstutter (pbind :foo (pseries)) (pseq (list 0 1 2) 1))))
        "pdurstutter returns correct results for event patterns when its N is a pattern, and when N is 0"))
  
  (test pbeats
  