   #((delete deletion-count)
     ((cursor (+ deletion-count (:pos %)))
      %)))
+
+(defn titled
+  "Produces a titling function which sets the title to `title`."
+  [title]
+  (fn [source-map]
+    (assoc source-map :title title)))
 
 (defn initial-text
   "Produces a source-map which has the initial text `text`."

  "Produces an edit function which decrements cursor index by `n`."
  [n]
  (fn [source-map]
    (update-in source-map [:pos] (partial - n))))

(defn cursor-right
  "Produces an edit function which increments cursor index by `n`."

             {:pos new-position
              :text new-text}))))

(defn forward-delete
  "Produces an edit function which deletes `deletion-count` characters from
  the text forwards from the current cursor position."
