                      :parse parse-data}))))
 
 (defn register
-  "Register a layout function to a shortname"
+  "Register a layout function to a shortname.
+
+  A layout function takes two arguments. The first is a snapshot of the global
+  configuration. The second is some sort of context map. It should look
+  something like Parse. The only required key is :layout which must be a
+  shortname of a registered layout function."
   [short-names layout-fn]
   (swap! layouts
          merge (zipmap (map name short-names)

  (apply @layouts (name layout-name) more))

(defn Parse->string
  [^incise.parsers.parse.Parse parse-data]
  (if-let [layout-key (:layout parse-data)]
    (if-let [layout-fn (get layout-key)]
      (layout-fn (conf/get) parse-data)

(ns incise.layouts.core
  (:require [incise.config :as conf])
  (:refer-clojure :exclude [get]))

(defonce layouts (atom {}))
