evancz/elm-architecture-tutorial

Random example does not introduce the main function

vlvagerviwager opened this issue · 2 comments

The Random example includes this line in Phase 1:

At this point, it is possible to wire it all up and take a look. You can click the , but nothing happens. Let's fix that!

However, there is no main function, so after following the steps, compiling it, and opening the HTML file, there is nothing in the browser.

  • OS: macOS Sierra 10.12.4
  • Elm version: 0.18.0

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

The latest version of https://guide.elm-lang.org/ introduces main much earlier in the text.

The first mention is in this example. I think the latest version of the guide also uses a different style. Instead of presenting the code as if we are writing as the book progresses, the book now examines code snippets from the overall example without suggesting that we are actively putting them together. There is also an Edit button on each example, so you can always start from a working version.