    (instance? String s) (java.io.StringReader. s)
    :else (throw (Exception. (format "can't turn %s into a Reader" s)))))
 
-(defn- %positioned-stream [reader δposition encoder line-offset column-offset]
+(defn- %positioned-stream [reader delta-position encoder line-offset column-offset]
   (lazy-seq
    (if-let [char (read-char reader)]
-     (cons [char (+ line-offset (:line δposition)) (+ column-offset (:column δposition))]
+     (cons [char (+ line-offset (:line delta-position)) (+ column-offset (:column delta-position))]
            (%positioned-stream
-            reader (inc-δposition δposition char encoder) encoder line-offset column-offset)))))
+            reader (inc-delta-position delta-position char encoder) encoder line-offset column-offset)))))
 
 (defn positioned-stream
   ([input]

            :column column
            :starts-with-newline? (if (zero? xc) yn xn)
            :ends-with-return? (if (zero? yc) xr yr)}))
  ([x y z & t] (reduce combine-δposition (list* x y z t))))

(defn char-δposition
  ([char encoder]
     (case char
       \return return-δposition
       \newline newline-δposition
       \formfeed formfeed-δposition
       \tab tab-δposition
       nil null-δposition
       (if (and (= encoder utf8-encoder) (< (int char) 128))
         %normal-char-δposition-1
         (normal-char-δposition char encoder))))
  ([char]
     (char-δposition char utf8-encoder)))

(defn inc-δposition
  ([δposition char encoder]
     (combine-δposition δposition (char-δposition char encoder)))
  ([δposition char]
     (inc-δposition δposition char utf8-encoder)))

(defn seq-δposition
  ([s encoder]
     (reduce #(inc-δposition % %2 encoder) null-δposition s))
  ([s]
     (seq-δposition s utf8-encoder)))

(defn to-char [c] (if (= c -1) nil (char c)))
(defn read-char [stream] (to-char (.read stream)))

  ([input options]
     (%positioned-stream
      (ensure-reader input)
      (or (:delta-position options) null-delta-position)
      (or (:encoder options) utf8-encoder)
      (or (:line-offset options) 0)
      (or (:column-offset options) 0))))
