Gleam has constants, but their made for actual constants. I'm looking for a way of binding a non-constant non-mutable global. For example, in React, you need a stable function or object reference:
fn my_context() -> ReactContext MyContext {
create_context(todo)
}
The above signature, although does what you think, doesn't work, because every time the function is called, it will yield a new context object with a diferent pointer. I.e., it's not referentially transparent.
How can I go about doing something like the following, but have actually compile?
const my_actual_context = my_context()