                forms))
 
 (defn cvt-fn [lvl params forms]
-  ["func" (cvt-fn-params params) "{\n" (cvt-fn-body (inc lvl) params forms) "}\n"])
+  ["func" (cvt-fn-params params) "{" (nl lvl)
+   (cvt-fn-body (inc lvl) params forms) "}" (nl lvl)])
 
 (defn cvt-defn [name params forms]
   ["func" (cvt-sym name) (rest (cvt-fn 0 params forms))])

  (re-seq (re-pattern (str ".{0," width "}\\s")) (str s " ")))

(defn ljust [width s] ; Left justify a string.
  (format (str "%-" width "s") s))

(defn read-model-file [fname]
    {:fname fname

       forms))

(defn cvt-let [lvl scope op [bindings & body]]
  [(interpose (nl lvl)
              (map (fn [[var-name init-val]]
                     [(cvt-sym var-name) ":= (" (cvt-expr (inc lvl) scope init-val) ")"])
                   (partition 2 bindings)))
   (nl lvl)
   (cvt-body (inc lvl) scope body)])

(defn cvt-if [lvl scope op [test then else]]
  ["if (" (cvt-expr (inc lvl) scope test) ") {" (nl lvl)
   (cvt-expr (inc lvl) scope then)
   (nl lvl) "} else {" (nl lvl)
   (cvt-expr (inc lvl) scope else)
   (nl lvl) "}"])

(defn cvt-cond [lvl scope op test-expr-forms]
  [(interpose "else"
              (map (fn [[test expr]]
                     ["if (" (cvt-expr (inc lvl) scope test) ") {" (nl lvl)
                      (cvt-expr (inc lvl) scope expr) "}" (nl lvl)])
                   (partition 2 test-expr-forms)))])

(defn cvt-ago [lvl scope op [self-actx actx body]]
  ["go {" body "}"])

(defn cvt-ago-loop [lvl scope op [self-actx parent-actx bindings & body]]
  ["(func() chan interface{} { result := make(chan interface{}, 1)" (nl lvl)
   "go (func() {" (nl lvl)
   (interpose (nl lvl)
              (map-indexed (fn [idx [var-name init-val]]
                             [(str "l" idx) ":=" (cvt-expr (inc lvl) scope init-val)])
                           (partition 2 bindings)))
   (nl lvl)
   "for {" (nl lvl)
   (interpose (nl lvl)
              (map-indexed (fn [idx [var-name init-val]]
                             [(cvt-sym var-name) ":=" (str "l" idx)])
                           (partition 2 bindings)))
   (nl lvl)
   (cvt-body (inc lvl) scope body)
   (nl lvl) "}})()" (nl lvl)
   "return result })()"])

(def cvt-special-fns
