There’s a nice tutorial on Agent: https://elixir-lang.org/getting-started/mix-otp/agent.html
More typically you’d just use a DB. If this is for testing or playing around, you can also use :erlang.unique_integer.
There’s a nice tutorial on Agent: https://elixir-lang.org/getting-started/mix-otp/agent.html
More typically you’d just use a DB. If this is for testing or playing around, you can also use :erlang.unique_integer.