I mentioned a symbol topsort + chiclet macro
the topsort algorithm is here
The gist of the macro in handwaving steps:
- get the dependency graph by filtering the body for symbols on the LHS of the
let bindings
- use topsort to generate the order of the declarations based on the dependency graph
- generate the standard let bindings based on topsort order
- name it something hip and blog about it as one clojure’s missing pieces.
- profit?
not too sure how to deal with impure stuff… maybe hide it in a subfunction.