       {})))
 
 (defn extract-associated-items [attr input]
+  "Extracts a collection representing a 'has many' association from input.
+  It returns a list of hash-maps, each representing one of the items from
+  the association.
+  attr is expected to be a hash-map with at least :name and :schema keys,
+  while input is expected to be a hash-map representing the whole profile, with strings as keys"
   (let [association-name   (:name attr)
         association-schema (:schema attr)
         attribute-names    (doall (keys input))

    {association-name associated-items}))

(defn parse-by-schema [input schema]
  (->> schema
       (reduce
         (fn [item attr]

    exploded-item))

(defn extract-attribute [attr-key input]
  "Extracts a hash-map containing a single key and its value from the input.
  The key is expected to be a keyword, while input is supposed to be a hash-map
  with strings as keys"
  (let [attr-name (name attr-key)
        attr-value (input attr-name)]
  {attr-key attr-value}))

(defn extract-nested-item [attr input]
  "Extracts a nested item from input, returning a hashmap with a single pair,
  where the key is the nested item association name, and the value is a json
  string representing all the attributes of the nested item.
  attr is expected to be a hash-map with at least :name and :schema keys,
  while input is expected to be a hash-map representing the profile, with strings as keys"
  (let [association-name   (:name   attr)
        association-schema (:schema attr)
        nested-item (->> association-schema
