/**
* run a {@link frege.prelude.PreludeBase.TStateT TGlobal IO} action and return the new TGlobal state
* @return the new state
*/
public static TGlobal runSTIO(Lazy action, TGlobal g) {
Lambda stg = Delayed.<Lambda>forced(action); // StateT (g -> IO (a, g))
Lambda r = Delayed.<Lambda>forced( TStateT.run(stg, g));
TTuple2 t = r.apply(42).result().<TTuple2>forced();
return Delayed.<TGlobal>forced(t.mem2);
}