diff --git a/exercises/score_tracker.livemd b/exercises/score_tracker.livemd index 77d2e929d..dfe9a1b1d 100644 --- a/exercises/score_tracker.livemd +++ b/exercises/score_tracker.livemd @@ -105,7 +105,7 @@ defmodule ScoreTracker do def start_link(_opts) do end - def score(score_tracker_pid, amount) do + def add_points(score_tracker_pid, amount) do end def current_score(score_tracker_pid) do diff --git a/reading/file.livemd b/reading/file.livemd index 88d7c254e..837f18249 100644 --- a/reading/file.livemd +++ b/reading/file.livemd @@ -230,7 +230,7 @@ File.write("data/erlang_term", %{1 => 2}) To get around these issues we can use `:erlang.binary_to_term/1` and `:erlang.term_to_binary/1` which convert an elixir term to and from binary. -When creating the file, we need to convert the Elixir term into binary using `:erlang.binary_to_term` +When creating the file, we need to convert the Elixir term into binary using `:erlang.term_to_binary/1` @@ -246,7 +246,7 @@ end :erlang.term_to_binary(%{key: "value"}) ``` -When reading the saved binary, we need to convert it back into an elixir term using `:erlang.term_to_binary/1`. +When reading the saved binary, we need to convert it back into an elixir term using `:erlang.binary_to_term/1`. diff --git a/reading/genservers.livemd b/reading/genservers.livemd index 5466d0067..77c854ba7 100644 --- a/reading/genservers.livemd +++ b/reading/genservers.livemd @@ -148,7 +148,7 @@ defmodule CounterServer do end ``` -Using the GenServer above, here's an example of sending an asynchronous message with `GenServer.cast/2` and an asynchronous message with `GenServer.call/3`. +Using the GenServer above, here's an example of sending an asynchronous message with `GenServer.cast/2` and a synchronous message with `GenServer.call/3`. ```elixir {:ok, pid} = GenServer.start_link(CounterServer, []) @@ -450,7 +450,7 @@ GenServer.cast(NamedCounter, :increment) :sys.get_state(NamedCounter) ``` -However some do not. of needed we can use `Process.whereis/1` to find the pid of a named process. +However, some do not. If needed, we can use `Process.whereis/1` to find the pid of a named process. ```elixir Process.whereis(NamedCounter) diff --git a/reading/phoenix_authentication.livemd b/reading/phoenix_authentication.livemd index b59880879..bc1757f5f 100644 --- a/reading/phoenix_authentication.livemd +++ b/reading/phoenix_authentication.livemd @@ -93,7 +93,7 @@ The client sends the token whenever it makes a request, and the server can use t ## Generators -Phoenix provides the following [mix phx.gen.auth](https://hexdocs.pm/phoenix/mix_phx_gen_auth.html) command to generate all of the scaffolding we need to auth authentication in our system. +Phoenix provides the following [mix phx.gen.auth](https://hexdocs.pm/phoenix/mix_phx_gen_auth.html) command to generate all of the scaffolding we need for authentication in our system. ``` mix phx.gen.auth Accounts User users diff --git a/reading/task.livemd b/reading/task.livemd index 40e0bd4d5..afa0fd0f0 100644 --- a/reading/task.livemd +++ b/reading/task.livemd @@ -53,7 +53,7 @@ spawn_pid = When we want to execute some code in a process, we shouldn't use [Kernel.spawn/1](https://hexdocs.pm/elixir/Kernel.html#spawn/1) or [Kernel.spawn_link/1](https://hexdocs.pm/elixir/Kernel.html#spawn_link/1) directly. Instead, we should rely on the [Task](https://hexdocs.pm/elixir/Task.html) module. The [Task](https://hexdocs.pm/elixir/Task.html) module allows us to spawn a process, perform some work in that process, then end the process when our work is finished. -[Task](https://hexdocs.pm/elixir/Task.html) is also OTP-compliant, meaning it conform to certain OTP conventions that improve error handling, and allow them to start under a supervisor. +[Task](https://hexdocs.pm/elixir/Task.html) is also OTP-compliant, meaning it conforms to certain OTP conventions that improve error handling, and allow them to start under a supervisor. ## Fire-and-Forget