anchor.diff:           (let ((pstr (as-pstream (pbind :dur 1/3 :foo (pseq (list 1 2 3) 1)))))
              (peek pstr)
              (beat pstr)))
  -      "beat method is counting peeked outputs"))
  +      "beat method is counting peeked outputs")
  +  (is (equal (list 1 2 nil)
  +             (peek-n (pseq (list 1 2) 1) 3))
  +      "peek-n does not return correct results")
  +  (is (equal (list 1 2)
  +             (peek-upto-n (pseq (list 1 2) 1) 3))
  +      "peek-upto-n does not return correct results"))
   
   (test next
     "Test next and next-upto-n"
  
positive.code:                (mapcar (lambda (e) (event-value e :foo)) (next-upto-n pstr 8))))
        "pstream's number is not accessible with pk"))
  
  (test next
    "Test next and next-upto-n"
    (is-true (equal (list (list 0 1) (list 2 3) (list 4) nil)
                    (let ((pstr (as-pstream (pseries 0 1 5))))
                      (list (next-upto-n pstr 2)
                            (next-upto-n pstr 2)
                            (next-upto-n pstr 2)
                            (next-upto-n pstr 2))))
             "next-upto-n gives wrong results"))
  
  (test peek
    "Test peek functionality"
  
negative.code:   "Test pscratch"
    (is (equal (list 0 1 2 3 0 1 2 3 0 1 2 3)
               (next-n (pscratch (pseries 0 1) (pseq (list 1 1 1 -3) :inf)) 12))
        "pscratch yields incorrect outputs when using patterns as source and step")
    (is (equal (list 0 0 0 0)
               (next-n (pscratch (pseries 0 1) (pseq (list 0) :inf)) 4))
        "pscratch yields incorrect outputs when step stays 0")
    (is (equal (list 0 0 1 1 2)
               (next-n (pscratch (pseries 0 1) (pseq (list 0 1) :inf)) 5))
        "pscratch yields incorrect outputs for steps of 0 and 1"))
  
  (test pif
    "Test pif"
  