Thank you for purchasing Elixir in Action. Please post any errors, other than those listed below, in the book's
Author Online Forum. We'll compile a comprehensive list and publish it here for everyone's convenience. Thank you!
Last updated October 14, 2016
Page 4 (PDF page 29), second paragraph
... the focus is on the internet and the Web ...
should be
... the focus is on the Internet and the Web ...
Page 13 (PDF page 38), second paragraph (the first below the note)
Elixir macros are inspired by LISP
should be
Elixir macros are inspired by Lisp
Page 13 (PDF page 38), last paragraph, ending of the last sentence
... that looks deceptively like the part of the language:
should be
... that looks deceptively like part of the language
Page 16 (PDF page 41), section 1.3.2, second paragraph
... that looks deceptively like the part of the language:
should be
... that looks deceptively like part of the language
Page 19 (PDF page 44), sidebar
... you can turn to elixir-lang mailing list ...
should be
... you can turn to the elixir-lang mailing list ...
Page 24 (PDF page 49), first paragraph
It's just syntactical sugar
should be
It's just syntactic sugar
Page 27 (PDF page 52), first sentence below the listing 2.2
Load this module to the shell
should be
Load this module into the shell
Page 32 (PDF page 57), URL above the 2.3.7 header
http://elixir- lang.org/docs/stable/elixir/Kernel.Typespec.html
should be
http://elixir-lang.org/docs/stable/elixir/typespecs.html
Pages 37, 38 (PDF pages 62, 63), section 2.4.4
iex(1)> prime_numbers = [1, 2, 3, 5, 7]
[1, 2, 3, 5, 7]
should be
iex(1)> prime_numbers = [2, 3, 5, 7]
[2, 3, 5, 7]
iex(6)> List.replace_at(prime_numbers, 0, 11)
[11, 2, 3, 5, 7]
should be
iex(6)> List.replace_at(prime_numbers, 0, 11)
[11, 3, 5, 7]
iex(7)> new_primes = List.replace_at(prime_numbers, 0, 11)
[11, 2, 3, 5, 7]
should be
iex(7)> new_primes = List.replace_at(prime_numbers, 0, 11)
[11, 3, 5, 7]
iex(8)> prime_numbers = List.replace_at(prime_numbers, 0, 11)
[11, 2, 3, 5, 7]
should be
iex(8)> prime_numbers = List.replace_at(prime_numbers, 0, 11)
[11, 3, 5, 7]
iex(9)> List.insert_at(prime_numbers, 4, 1)
[11, 3, 5, 7, 1]
should be
iex(9)> List.insert_at(prime_numbers, 4, 1)
[11, 3, 5, 7, 1]
Page 41 (PDF page 66), last paragraph, last sentence
... reverse the entire list in a single pass
should be
... reverse the entire list in a single pass.
Page 43 (PDF page 68), sentence before the first code snippet
The following snippet demonstrates how to creates a map:
should be
The following snippet demonstrates how to create a map:
Page 43 (PDF page 68), first paragraph
... it doesn't perform well with large number of elements, ...
should be
... it doesn't perform well with large numbers of elements ...
Page 43 (PDF page 68), first sentence before the first code snippet
... they aren't mature as I ...
should be
... they aren't as mature as I ...
Page 43 (PDF page 68), first sentence before the third code snippet
Atom keys again receive special syntax treatment.
should be
Atom keys also receive special syntax treatment.
Page 43 (PDF page 68), penultimate paragraph
... the fields list can be reused between both versions
should be
... the field list can be reused between both versions
Page 45 (PDF page 70), first sentence above the second code snippet
If the total size of all the values isn’t a multiplier of 8 ...
should be
If the total size of all the values isn’t a multiple of 8
Page 50 (PDF page 75), third bullet
File I/O or communication ...
should be
File I/O and communication ...
Page 52 (PDF page 77), first sentence below subsection "HashDict"
A HashDict is a module ...
should be
HashDict is a module ...
Page 54 (PDF page 79), first paragraph
... and use maps for all other cases (small, fix-sized structures).
should be
... and use maps for all other cases (small, fixed-size structures).
Page 57 (PDF page 82), second paragraph
... which are heavily inspired by LISP ...
should be
... which are heavily inspired by Lisp ...
Page 57 (PDF page 82), sidebar
... the receive construct ...
should be
... receive construct ...
Page 58
... BEAMtries to find ...
should be
... BEAM tries to find ...
Page 66 (PDF page 91), second paragraph
You can read the file contents with the help of the File.read/2 function:
should be
You can read the file contents with the help of the File.read/1 function:
Page 70 (PDF page 95), third paragraph
... especially if you’re dealing with unicode strings ...
should be
... especially if you’re dealing with Unicode strings ...
Page 83 (PDF page 108), first paragraph
... depending on the truthyness ...
should be
... depending on the truthiness ...
Page 90 (PDF page 115), section 3.4.3, first paragraph after the code listing
The function Enum.each/2 takes an enumerable (in this case, a list, and a lambda.
should be
The function Enum.each/2 takes an enumerable (in this case, a list), and a lambda.
Page 92 (PDF page 117), last paragraph
The lambda receives the current accumulator value and the element from the enumerable.
should be
The lambda receives the element from the enumerable and the current accumulator value.
Page 99 (PDF page 124), "Practicing" subsection
Using large_lines!/1 as a model, write the following function:
should be
Using large_lines!/1 as a model, write the following functions:
Page 108 (PDF page 133), section 4.1.4, first paragraph
The following snip- pet demonstrates how could such an abstraction be used:
should be
The following snip- pet demonstrates how such an abstraction could be used:
Page 112 (PDF page 137), first paragraph below the "Records" sub-section
This is a facility that let’s you use tuples ...
should be
This is a facility that lets you use tuples ...
Page 115 (PDF page 140), first sentence below the listing 4.11
The to-do list will now be represented as the struct with two fields.
should be
The to-do list will now be represented as a struct with two fields.
Page 115 (PDF page 140), listing 4.12, code annotation
Adds the new entry the entries list
should be
Adds the new entry to the entries list
Page 125 (PDF page 150), penultimate paragraph
Therefore, you can issue following calls:
should be
Therefore, you can issue the following calls:
Page 129 (PDF page 154), first paragraph above 4.4
... any generic code that relies on the that protocol ...
should be
... any generic code that relies on that protocol ...
Page 134 (PDF page 159), first paragraph
In BEAM, a unit of concurrency is a process:
should be
In BEAM, the unit of concurrency is a process:
Page 136 (PDF page 161), above the first code snippet
... presented in a following snippet:
should be
... presented in the following snippet:
Page 145
The sentence in the first paragraph
The caller sends a message in the format {:run_query, caller, number}.
should be
The caller sends a message in the format {:run_query, caller, query_def}.
Page 151 (PDF page 176), multiple occurrences
"value message" and "value request"
should be
":value message" and ":value request"
Page 153 (PDF page 178), first code snippet
...
[%{date: {2013, 12, 19}, id: 3, title: "Movies"},
%{date: {2013, 12, 19}, id: 1, title: "Dentist"}]
[TodoList.Entry[id: 1, date: {2013, 12, 19}, title: "Dentist"],
TodoList.Entry[id: 3, date: {2013, 12, 19}, title: "Movies"]]
should be
...
[%{date: {2013, 12, 19}, id: 3, title: "Movies"},
%{date: {2013, 12, 19}, id: 1, title: "Dentist"}]
Page 154 (PDF page 179), first paragraph below the first code snippet
... you'll use the proper mix project ...
should be
... you'll use a proper mix project ...
Page 155 (PDF page 180)
Here, you delegate to the TodoList function ...
should be
Here, you delegate to the TodoList.add_entry/2 function ...
Page 165 (PDF page 190), first paragraph
... but in this chapter we'll focus on one of its most important part: ...
should be
... but in this chapter we'll focus on one of its most important parts: ...
Page 165 (PDF page 190), first paragraph
... a simplified version of it based on message-passing ...
should be
... a simplified version of it, based on message-passing ...
Page 165 (PDF page 190), first sentence before the code snippet
You can store that atom into a variable and use the variable later to invoke functions on it:
should be
You can store that atom in a variable and use the variable later to invoke functions on the module:
Page 187 (PDF page 212), section 7.2.2, first paragraph
In the Elixir/Erlang world, HTTP servers typically use separate process ...
should be
In the Elixir/Erlang world, HTTP servers typically use a separate process ...
Page 188 (PDF page 213), fourth paragraph
For this specific case, the to-do cache performs very simple operatio
should be
For this specific case, the to-do cache performs a very simple operation:
Page 228 (PDF page 253), second code listing
{:noreply, deregister_pid(new_registry, pid)}
should be
{:noreply, deregister_pid(process_registry, pid)}
Page 253 (PDF page 278), fourth paragraph
This means only client process must be able to write to the table ...
should be
This means only the cache process must be able to write to the table ...
Page 273 (PDF page 298), second paragraph
The OTP itself the following folder convention:
should be
The OTP itself recommends the following folder convention: