The first handle_cast({:send, email}, state)
does not update the state so the example will not work as described.
It’s missing:
state = %{state | emails: emails}
The first handle_cast({:send, email}, state)
does not update the state so the example will not work as described.
It’s missing:
state = %{state | emails: emails}