Create a version of core interp for the state monad