startWithMVar :: AppVar a -> IO ()
startWithMVar mvar = do
    app   <- takeMVar mvar
    uData <- app^.userApp.onStart $ app^.userApp.userData
    putMVar mvar $ (app & userApp.userData .~ uData)
    iterateWithMVar mvar


-- Iterates stepApp over the state until shouldQuit evaluates false.
startWithMVar :: AppVar a -> IO ()
startWithMVar mvar = do
    app   <- takeMVar mvar
    uData <- app^.userApp.onStart $ app^.userApp.userData
    putMVar mvar $ (app & userApp.userData .~ uData)
    iterateWithMVar mvar


-- Iterates stepApp over the state until shouldQuit evaluates false.
startWithMVar mvar = do
    app   <- takeMVar mvar
    uData <- app^.userApp.onStart $ app^.userApp.userData
    putMVar mvar $ (app & userApp.userData .~ uData)
    iterateWithMVar mvar


-- Iterates stepApp over the state until shouldQuit evaluates false.