What's the logic behind the core language macros?

I mentioned a symbol topsort + chiclet macro

the topsort algorithm is here

The gist of the macro in handwaving steps:


  1. get the dependency graph by filtering the body for symbols on the LHS of the let bindings
  2. use topsort to generate the order of the declarations based on the dependency graph
  3. generate the standard let bindings based on topsort order
  4. name it something hip and blog about it as one clojure’s missing pieces.
  5. profit?

not too sure how to deal with impure stuff… maybe hide it in a subfunction.