Run mkHWFunction and addFunc in a State monad.