small medium large xlarge

The latest version of the book is P1.0, released almost 3 years ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: P1.0 (28-Jan-15)
#78104
PDF page: all
In the pdf format for the book, all of the letter 's' and 'S' are invisible in normal text. The letter S is copyable (shows up in with copy/paste). So...more...
  • Reported in: P1.0 (28-Jan-15)
#78103
PDF page: 13

best of both words.... should be best of both worlds--Jim Freeze

  • Reported in: P1.0 (30-Jan-15)
#78127
PDF page: 15
"Be sure to launch iex in the same directory that you created your unless.exs file..." Then in the iex session you are told to compile: "iex> c "mac...more...
  • Reported in: P1.0 (08-Feb-15)
#78170
PDF page: 15
Before the code example it is suggested that iex should start from inside the directory with the unless.exs file. If that happens then the first li...more...
  • Reported in: P1.0 (15-Sep-15)
#78825
PDF page: 16
Elixir macros strike an excellent balance for safeguarding your context while allowing explicit access where neccesary. -> necessary --Deans Charba...more...
  • Reported in: P1.0 (29-Jan-15)
#78113
PDF page: 17

IEx output has unquoted apostrophes leading to formatting errors.--Trond Mjoen

  • Reported in: P1.0 (05-Jul-16)
#80496
PDF page: 21

The code
para(for i <- 1..10 do: i * 10)

is missing a coma after the range 1..10. It should be:
para(for i <- 1..10, do: i * 10)--Daniel Garcia

  • Reported in: P1.0 (17-Apr-15)
#78344
PDF page: 22
Re-creating the if Macro has an example that reuses the existing if macro. However, just changing line 2 from using if to my_if doesn't work. An alter...more...
  • Reported in: P1.0 (30-Jan-15)
#78129
PDF page: 22

Middle of the page:

iex> c "if_recreated.exs"
[MyIf]

should be:

iex> c "if_recreated.exs"
[ControlFlow]
--pcmarks

  • Reported in: P1.0 (08-Feb-15)
#78169
Paper page: 22
The line: defmacro my_if(expr, do: if_block), do: if(expr, do: if_block, else: nil) The do block uses `if` However the macro should be de...more...
  • Reported in: P1.0 (10-Feb-15)
#78174
PDF page: 22
When entering the iex shell and compiling the file the return value should be different. So instead of: iex> c "if_recreated.exs" [MyIf] it sh...more...
  • Reported in: P1.0 (13-Aug-16)
#80617
Paper page: 22
This has been reported already in #78169, but it's not just a matter of reusing my_if and not using if. The first version that has empty else block is...more...
  • Reported in: P1.0 (30-Jan-15)
#78130
PDF page: 24

iex(1)> c "while.exs"

should be:

iex(1)> c "while_step1.exs"

--pcmarks

  • Reported in: P1.0 (30-Jan-15)
#78131
PDF page: 25

iex> c "while.exs"

should be:

iex> c"while_step2.exs"

--pcmarks

  • Reported in: P1.0 (31-Jan-15)
#78133
PDF page: 31,32

Similar mismatch between source file name and name used when compiling as pages above.

I won't add any more errata that are similar.

--pcmarks

  • Reported in: P1.0 (11-Feb-15)
#78176
PDF page: 31

Shouldn't the require, put_env and function definition be repeated here as in the previous page 30?
--Kosmas Chatzimichalis

  • Reported in: P1.0 (11-Feb-15)
#78178
PDF page: 33
Shouldn't the all the commands needed in iex be displayed? as in: iex(1)> c "macros/math_test_import.exs" [MathTest] iex(2)> import MathTest ...more...
  • Reported in: P1.0 (12-Feb-15)
#78182
PDF page: 35
iex result when compiling should show both MathTest and Assertion. So this: iex(1)> c "macros/module_extension_custom.exs" ...more...
  • Reported in: P1.0 (17-Feb-15)
#78191
PDF page: 38
iex> c "assertion.exs" [Assertion.Test, Assertion] should be: iex> c "accumulated_module_attributes.exs" [Assertion.Test, Assertion] --Kosmas...more...
  • Reported in: P1.0 (19-Feb-15)
#78193
PDF page: 39

iex> c "assertion.exs"
[Assertion.Test, Assertion]

should be:

iex> c "before_compile.exs"
[Assertion.Test, Assertion]
--Kosmas Chatzimichalis

  • Reported in: P1.0 (02-Feb-15)
#78142
PDF page: 40

Typo in the module name, Assert.__before_compile__/1 should be Assertion.__before_compile__/1--John Warwick

  • Reported in: P1.0 (31-Jan-15)
#78132
PDF page: 41
I noticed that when the `assert` functions used IO.puts to output their results right away, running `MathTest.run` always worked for all assertions. ...more...
  • Reported in: P1.0 (09-May-15)
#78424
PDF page: 41
Assert macro as written is broken: if test has multiple assertions, only failure in the last one will be reported (as it's going to be the return valu...more...
  • Reported in: P1.0 (19-Feb-15)
#78194
PDF page: 42
Shouldn't the two modules be recompiled again before running the MathTest.run? iex> c "assertion.exs" [Assertion.Test, Assertion] iex> c "math_te...more...
  • Reported in: P1.0 (01-Feb-15)
#78137
PDF page: 46

the line:

text/html.html

needs to be added to mimes.txt in order for a subsequent call to valid_type? on page 47 to work.

--Peter C Marks

  • Reported in: P1.0 (23-Feb-15)
#78203
PDF page: 51
line 13 of the code, deftranslations definitions. defp deftranslations(locales, current_path, mappings) do should be: defp deftranslations(lo...more...
  • Reported in: P1.0 (23-Feb-15)
#78202
PDF page: 52

iex> c "translator.exs"
[Translator]

should be:

iex> c "translator_step3.exs"
[Translator]--Kosmas Chatzimichalis

  • Reported in: P1.0 (23-Feb-15)
#78204
PDF page: 53

iex> c "translator.exs"
[Translator]

should be:

iex> c "translator_step4.exs"
[Translator]
--Kosmas Chatzimichalis

  • Reported in: P1.0 (23-Feb-15)
#78205
PDF page: 54
line 7 on the t definition binding should be bindings def t(locale, path, binding \\ []) should be def t(locale, path, bindings \\ []) --Kos...more...
  • Reported in: P1.0 (23-Feb-15)
#78206
PDF page: 54

iex> c "translator.exs"
[Translator]

should be:
iex> c "macro_to_string.exs"
[Translator]
--Kosmas Chatzimichalis

  • Reported in: P1.0 (23-Feb-15)
#78207
PDF page: 56

iex> c "translator.exs"
[Translator]

should be:

iex> c "translator_final.exs"
[Translator]
--Kosmas Chatzimichalis

  • Reported in: P1.0 (23-Feb-15)
#78208
PDF page: 56
function definition should have bindings instead of binding. def(t(locale, path, binding \\ [])) shoudl be: def(t(locale, path, bindings \\ [...more...
  • Reported in: P1.0 (25-Feb-15)
#78211
PDF page: 59

Since we used cd hub previously the name of the file should be:

mix.exs

instead of:

hub/mix.exs
--Kosmas Chatzimichalis

  • Reported in: P1.0 (02-Feb-15)
#78139
PDF page: 61
Hub.linguist does not return a value because the GitHub API delivers repos a page at a time and the default page size is 30. The last repo is "labrado...more...
  • Reported in: P1.0 (14-Sep-16)
#80718
PDF page: 61
When I run "Hub." in `iex -S mix` I see this: Interactive Elixir (1.4.0-dev) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> Hub. ...(1)...more...
  • Reported in: P1.0 (02-Feb-15)
#78140
PDF page: 65

"We're going explore" => "We're going to explore"

--Peter C Marks

  • Reported in: P1.0 (26-Mar-15)
#78279
PDF page: 66
The first test file that is created is called while_test_step1.exs so the command to run the test should be: $ elixir while_test_step1.exs --Kosma...more...
  • Reported in: P1.0 (27-Mar-15)
#78281
PDF page: 67
If we do not remove the first test from the file then the result should show 2 tests passing. Otherwise we should mention that the test introduced ...more...