           path'
           (recur (butlast path')))))))
 
-(defn raise-errors [data]
+(defn raise-errors
   "Extract errors from the data root and inject those in the same level where
    the error item is present. For example:
 

    #{}
    children))

(defn deep-merge [& xs]
  "Merges nested maps without overwriting existing keys."
  (if (every? #(or (map? %) (nil? %)) xs)
    (apply merge-with deep-merge xs)
    (last xs)))

  (let [key (some-> ast :key)]
    (if (sequential? key) (second key))))

(defn ensure-attrs
  "DEPRECATED: use p/entity
  Runs the parser against current element to garantee that some fields are loaded.
  This is useful when you need to ensure some values are loaded in order to fetch some
  more complex data."
  [env attributes]
  (entity env attributes))
