The indexed continuation monad