 
 (defn update-in-context
   "Update the application state by applying the given operation to the state of the component implied by
-  the given context. Think of this as a 'targeted' `swap!` where you don't have to know where the data is 
+  the given context. Think of this as a 'targeted' `swap!` where you don't have to know where the data is
   stored. This function also records the change in this state history with an optional associated Reason."
   [context operation undoable compressable reason]
   (let [application (-> context :application)

          [] path-seq))

(defn data-path
  "Used by internal context tracking to correct the internal path to account for the inclusion of vectors as data structures 
  pointing to items in vectors."
  [context]
  (let [state @(-> context :application :app-state)


(defn list-element-id
  "Construct a proper sub-element ID for a list in a component's state.

  Parameters:
  - `current-component-data` The full data of the component being rendered
  - `subcomponent-id` The keyword used to find the sub-list (which must be a vector) in the current component's state.
  - `subelement-keyword` The keyword used within the list **items** that uniquely identifies that item. MUST exist and not change over time.
  - `desired sub-element` An instance of an item (the entire item, not it's key) from the sublist

  Returns an Untangled ID that uniquely identifies the supplied item for the rendering system.

  For example, in the state:

       (def a { :k 1 :v 1 })
       (def b { :k 1 :v 2 })

       ...
       :state {
            :list [ a b ]
            }

  in the renderer:

       (defscomponent Thing [data context]
         (let [element-id (partial list-element-id data :state :k)]
            (ul {}
               (map
                  (fn [item] (SubComponent (element-id item) context))
                  (:items data))
             )))
  "
  [current-component-data subcomponent-id subelement-keyword index]
  (let [subelement (get-in current-component-data [subcomponent-id index])
        subelement-key (get subelement subelement-keyword)
        ]
    [subcomponent-id subelement-keyword subelement-key index]))
