The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

39590 (3) [Avatar] Offline
#1
On page 10 the author talks about if-expressions, and presents code on multiple lines.

However, the REPL responds thusly:

> elf = 1
1 : number
> if elf == 1 then
-- SYNTAX PROBLEM -------------------------------------------- repl-temp-000.elm

I need whitespace, but got stuck on what looks like a new declaration. You are
either missing some stuff in the declaration above or just need to add some
spaces here:

4| elf = 1
   ^
I am looking for one of the following things:

    whitespace


3 points:

1. The author needs to declare that a \ character is used to enter multiple lines into Elm's REPL.
2. The fact that I need to enter \ is crappy on Elm's part. Ruby figures out what I am doing and does the right thing.
3. Contrary to the author's repeated claims, and unfortunately, John Carmack's alleged claim, that error message is crap.

Edit:

The author mentions adding \ to multiple lines on page-13. Add it to page-10.