In my first game Boohu, my game loop was messy, with game logic interleaved with drawing, but my later games Harmonist and Shamogu use Gruid's Update/Draw loop attached to a model (containing state), inspired from Elm's architecture and bubbletea's, but a bit less "functional-style" to adapt it to a grid-based roguelike needs.
The Update method is called with an input message each time there's an incoming one. It updates the state of the game, and it may return one or more Effect values. Effects are functions that are run asynchronously on a goroutine, and may send one or more custom messages to the Update game loop. This is useful for extra messages beyond the basic ones for input events from the backend (SDL, terminal or js/wasm). For example, I use it for interruptable animations, to send "next animation frame" messages at appropriate times, with a number identifier that ties them to a particular animation, so that they may be ignored if that animation has been interrupted (by a keypress or some other action).
The Draw method is called after every Update and returns a grid of cells with color, letter (possibly represented by a tile), and attributes (possibly custom ones). The grid is typically cached, though a new one can be returned in a kinda functional way. Gruid then sends the grid to the backend for screen drawing and to the replay recorder, but it only sends the grid changes from previous frame, not the whole grid (unless screen was exposed). That system means that, following the spirit of typical terminal applications, when the game is idle with no animations going on, no drawing happens and the cpu is idle. This is nice, because typically animations are pretty short, so having a drawing function getting called all the time even when nothing changed would've been wasteful.
Both Update and Draw dispatch to different code paths depending on the model's state (typically to distinguish between map mode, inventory mode, new game screen, and so on).