anchor.diff:                   (if (> (length v) c)
                        (subseq v 0 c)
                        v))))
  +      (let ((n (floor (/ skip n)))
  +            (m (mod skip n)))
  +        (loop repeat n do (funcall gen))
  +        (rec m))
         #'rec)))
   
   (defun num-gen (n &optional (init #*10))
  
positive.code:                      (cons o c)
                       c))))
  
  (defun sbeginsp (p g)
    (if (equal #* p)
        t
        (if (equal (bitbv (elt p 0)) (funcall g))
            (sbeginsp (subseq p 1) g)
            nil)))
  
  (defun sfind (p n)
    (let ((gen (bit-gen n))
          (len (seq-length n)))
      (labels ((rec (p rem n)
                 (if (zerop n)
                     nil
                     (let ((v (concatenate 'bit-vector rem (funcall gen (- (length p) (length rem))))))
                       (if (equal p v)
                           t
                           (rec p (subseq v 1) (1- n)))))))
        (rec p #* len))))
  
  (defun sfind-all (p n)
    (let ((gen (bit-gen n))
          (len (seq-length n)))
      (labels ((rec (p rem n o c)
                 (if (zerop n)
                     c
                     (let ((v (concatenate 'bit-vector rem (funcall gen (- (length p) (length rem))))))
                       (if (equal p v)
                           (rec p (subseq v 1) (1- n) (1+ o) (cons o c))
                           (rec p (subseq v 1) (1- n) (1+ o) c))))))
        (rec p #* len 0 nil))))
  
negative.code:              (setq v (dcdr v))
               b)))))
        
  (defun bit-gen (n &optional (init #*10) (skip 0))
    "return a function representing prbs-N. The returned function takes a single argument which is the number of the next bits to generate from the sequence (default 1 bit)."
    (let ((gen (bvlist-gen n init))
          (res #*))
  