App

:= { apply : AppConfig -> AppConfig }
map2 : App(a), App(b), (a, b -> c) -> App(c)
init : Config, InitCallback(model, errors) -> Init(model, errors)

Build app initialization from pure startup config plus the effectful callback that creates the first model after raylib/audio are ready.

InitCallback : Host => Try(model, [Exit(I64), ..errors])

Effectful startup callback run after the host has initialized raylib and audio. Return Ok(model) to start the app, Err(Exit(code)) to quit before the first frame, or let other initialization errors propagate.

Init : {
    config : Config,
    run! : InitCallback(model, errors),
}