   [fns]
   {:pre [(sequential? fns)
          (every? map? fns)]
-   :post [(string? %)]}
+   :post [(every? string? %)]}
   (let [fn-addrs (into {} (map (juxt :name :address) fns))]
     (->> (mapcat :code fns)
-         (map #(code->str fn-addrs %))
-         (string/join "\n"))))
+         (map #(code->str fn-addrs %)))))
 
 (defn compile-function
   [[name args & body :as code] fns]
   {:pre [(list? code)]}
   (let [fns (conj fns {:name name})
         [stmt & stmts] (mapcat #(compile-form args fns %) body)
-        code (concat [(conj stmt (format "; define %s" name))]
+        code (concat [(conj stmt (format "; #%s" name))]
                      stmts
                      [[:rtn]])]
     {:name name

(defn generate-prelude
  [fns]
  (let [loads  (for [func fns]
                 [:ldf (:name func)])
        code (concat [[:dum (count fns) "; define prelude"]]
                     loads
                     [[:ldf 'main]
                      [:rap (count fns)]
                      [:rtn]])
        prelude {:name 'prelude

        (-> fns
            (generate-main)
            (generate-prelude)
            (emit-code)
            (resolve-references)
            (#(string/join "\n" %)))))))
