Search code examples
macrosclojureinversion-of-controlstate-machinecore.async

Clojure - inversion of control macro - Timothy Baldridge


In this podcast on core.async at approximately 12 mins in, Rich Hickey refers to a macro written by Timothy Baldridge that does 'inversion of control'. That this macro rewrites code into a state machine.

Does anybody have a link to where this code is on github?


Solution

  • The code is located in the core.async repository.

    The ioc macros are defined in the clojure.core.async.impl.ioc-macros namespace and used in the implementation of the go macro.