       }
       list = next
     }
+    guard list.isNull else {
+      throw EvalError.typeError(vectors, [.properListType])
+    }
     return .fixnum(Int64(n))
   }
   

    self.define(Procedure("vector-length", vectorLength))
    self.define(Procedure("make-vector", makeVector))
    self.define(Procedure("vector-append", vectorAppend))
    self.define(Procedure("vector-ref", vectorRef))
    self.define(Procedure("vector-set!", vectorSet))
    self.define(Procedure("vector-swap!", vectorSwap))

      "        (do ((i 0 (fx1+ i)))",
      "            ((fx>= i len) res)",
      "          (vector-set! res i (apply f (_vector-list-ref i vecs)))))))")
    self.define("vector-map!", via:
      "(define (vector-map! f xs . xss)",
      "  (let* ((vecs (cons xs xss))",
      "         (len (_vector-list-length vecs)))",
      "    (if (null? xss)",
      "        (do ((i 0 (fx1+ i)))",
      "            ((fx>= i len))",
      "          (vector-set! xs i (f (vector-ref xs i))))",
      "        (do ((i 0 (fx1+ i)))",
      "            ((fx>= i len))",
      "          (vector-set! xs i (apply f (_vector-list-ref i vecs)))))))")
    self.define("vector-for-each", via:
      "(define (vector-for-each f xs . xss)",
      "  (let* ((vecs (cons xs xss))",
