         (accessor-error "missing value"
                         accessor x nil)))))
 
+(defn make-valid-output? [accessor]
+  (:valid-value? accessor))
+
+(defn make-valid-input? [accessor]
+  (let [c? (:can-set accessor)
+        v? (:valid-value? accessor)]
+    (fn [obj x]
+      (and (v? x)
+           (c? obj x)))))
+
 (defn make-validate-value [accessor]
-  (let [v? (:valid-value? accessor)]
+  (let [v? (:valid-output? accessor)]
     (fn [x]
       (if (v? x)
         x

      (b (s (b obj) (v x))))))

(defn make-checked-remove [accessor]
  (debug/dout accessor)
  (let [b (:validate-base accessor)
        r (:remove accessor)
        r? (:can-remove? accessor)]

(defn vector-methods [index]
  {:can-get? #(< index (count %))
   :get #(nth % index)
   :set (fn [obj x] (assoc obj index x))
   :can-remove? (constantly false)
   :remove identity})

(defn vector-accessor 
  ([index extra-opts] 
