this is what the closure actually looks like if you're curious! https://gist.github.com/Archenoth/d189ce7b20ea922be3d3169f6b369fef
(i named it .clj because github doesn't recognize fennel)
basically, every tick, the coroutine to render a single line of dialogue resumes with a new time in scope, and based on that, renders a subset of text
after it renders a full line, it continues to a new yield loop to render the bouncy triangle at the bottom to note you can progress
and when the coroutine finally finishes, a new line takes its place
the magic is that resuming a coroutine just jumps right back to the place i yielded from, so i can break this coroutine into tiny pieces that get rendered every frame
meaning, i only ever need to interact with it in once place after making it; it's completely self-contained!
(i wonder how this compares to how scheme continuations work?)
anyway, fennel continues to be a super-cool language that i like lots, so it's cool finding excuses to use it more