Updated Elm Examples
The Elm examples given in the book (especially from Day Two, forward) are for an older version of Elm. Elm 0.17 changed a lot of things in the language, including eliminating signals and moving a lot of the libraries around.
I’ve translated the Day Two examples from the book to run on Elm 0.18
Avoiding Callbacks (p. 103)
Elm 0.17+ avoids callbacks using Subscriptions, not Signals: https://gist.github.com/mindbat/7afc23cad8da000e4b26de55986d4eaf
Maintaining State (p. 104-105)
For all three of these examples, we need to swap signals for subscriptions:
- Counting Mouse Moves: https://gist.github.com/mindbat/237066ca2a083bd5bb4e449c82f72a74