But I keep getting stuck with atts requiring 1 more level of evaluation. E.g. the following needs to evaluate t#:
Why does it seem like one less level of evaluation happens in Clojure?
Definitions of supporting functions:
;note doesn't handle nils because I'm dumb (defn pair [init-lst] (loop [lst init-lst item nil pairs []] (if (empty? lst) pairs (if item (recur (rest lst) nil (conj pairs [item (first lst)])) (recur (rest lst) (first lst) pairs))))) (defn print-tag [name alst closing] (print "<") (when closing (print "\\")) (print name) (doall (map (fn [[h t]] (printf " %s=\"%s\"" h t)) alst)) (print ">")) (For some reason I didn't do the pair function in the same way as the book which means it doesn't handle nils correctly)