I was noodling around with some simple code and noticed that the following executes out of procedural order, e.g. "the end" sometimes prints in the middle of the list.each execution. Can you help me understand why that is?
import gleam/io
import gleam/list
pub fn main() {
let my_name = "Bob"
io.println("Hello " <> my_name <> "! Welcome to the Gleam world.")
let my_list = [1, 2, 3, 4, 5]
list.each(my_list, fn(x) { io.debug(x) })
io.println("This is the end, my friend.")
}