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}
Thanks for reporting this @chriseyre2000. That’s definitely a mistake, I’ll fix this for the next ebook version