 
 (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)

      nil)))

(defn context-operator
  "Create a function that, when called, updates the app state localized to the given context. Think of this as a 
  constructor for targeted `swap!` functions.
  
  Parameters:
  `context`: the target rendering context
  `operation`: A 1-arg function that takes the data at the context's path, and returns an updated version
  
  Optional named parameters:
  
  - `:undoable boolean`: Indicate that this state change is (or is not) undoable. Defaults to true.
  - `:compress boolean`: Indicate that this state change can be compressed (keeping only the most recent of adjacent
    compressable items in the state history). Defaults to false.
  - `:trigger evt-kw`: Sets user-defined event to be triggered (in the parent) when the
  *generated* operation runs. E.g. `:trigger :deleted`.  May be a list or single keyword.
  - `:reason Reason`: When the *generated* operation runs, causes resulting application state change in history to
   include the stated (default) reason. The reason can be overridden by passing a :reason named parameter to the 
   generated function.
  
  The trigger parameter indicates that the resulting function will trigger those abstract events on the parent.
  
  Examples:
  
  let [set-today (context-operator context set-to-today :trigger :date-picked :reason \"Set date\")]
  ...
      (d/button { :onClick set-today } \"Today\")
      (d/button { :onClick (fn [] (set-today :reason \"Clicked 'Today'\")) } \"Today\"))

    ))

(defn parent-data
  "Find data with the given key recursively in parent(s) of the given context.
  Searches up in the context scopes until it finds data for the given key.
  Returns nil if no such data can be found"
  [context key]
