      :cars    (generate-relation)
      :flights (generate-relation)
      :rooms   (generate-relation)}))
+
+(defn- log-data [{:keys [reservations cars flights rooms]}]
+  "Write `data` to log."
+  (log "reservations:" reservations)
+  (log "cars:" cars)
+  (log "flights:" flights)
+  (log "rooms:" rooms))
 
 (defn- look-for-seats [relations n-seats]
   "Look for a relation with `n-seats` free seats in `relations`, and return the


; MAIN

(defn- log-data [{:keys [reservations cars flights rooms]}]
  "Write `data` to log."
  (log "reservations:" reservations)
  (log "cars:" cars)
  (log "flights:" flights)
  (log "rooms:" rooms))

(defn -main [& args]
  "Main function. `args` should be a list of command line arguments."
  (when-let [options (parse-args args)]

      (when found-flight (reserve-relation reservation found-flight n-people))
      (when found-room   (reserve-relation reservation found-room n-people))
      (alter reservation assoc
        :status :processed
        :pnr    pnr)))
  (log "finished reservation" (:id @reservation)))

