Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/elixir/lib/calendar/datetime.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,7 @@ defmodule DateTime do

Although the first example shows a difference of 2 hours when
comparing the wall clocks of the given datetime with the returned one,
due to the "spring forward" time jump, the actual ellapsed time is
due to the "spring forward" time jump, the actual elapsed time is
still exactly of 1 hour.

In case you don't want these changes to happen automatically or you
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/lib/file.ex
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ defmodule File do
directories of `path`
* `:enospc` - there is no space left on the device
* `:enotdir` - a component of `path` is not a directory
* `:eperm` - missed required permisions
* `:eperm` - missed required permissions
## Examples
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/lib/module.ex
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ defmodule Module do
written to disk, and therefore raising does not effectively halt compilation
and may leave unused artifacts on disk. If you must raise, use `@after_compile`
or other callback. Given modules have already been compiled, functions in
ths module, such as `get_attribute/2`, which expect modules to not have been
this module, such as `get_attribute/2`, which expect modules to not have been
yet compiled, do not work on `@after_verify` callback.

Accepts a module or a `{module, function_name}` tuple. The function
Expand Down
4 changes: 2 additions & 2 deletions lib/elixir/pages/anti-patterns/macro-anti-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ end

In the previous example, even though Elixir does not know which modules the function `example/0` was invoked on, it knows the modules `OtherModule.Foo` and `OtherModule.Bar` are referred outside of a function and therefore they become compile-time dependencies. If any of them change, Elixir will recompile `MyModule` itself.

However, you should not programatically generate the module names themselves, as that would make it impossible for Elixir to track them. More precisely, do not do this:
However, you should not programmatically generate the module names themselves, as that would make it impossible for Elixir to track them. More precisely, do not do this:

```elixir
defmodule MyModule do
Expand Down Expand Up @@ -348,7 +348,7 @@ end

#### Refactoring

To address this anti-pattern, you should avoid defining module names programatically. For example, if you need to dispatch to multiple modules, do so by using full module names.
To address this anti-pattern, you should avoid defining module names programmatically. For example, if you need to dispatch to multiple modules, do so by using full module names.

Instead of:

Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/pages/mix-and-otp/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,4 @@ end

When a long action is performed on the server, all other requests to that particular server will wait until the action is done, which may cause some clients to timeout.

Some APIs, such as GenServers, make a clearer distiction between client and server, and we will explore them in future chapters. Next let's talk about naming things, applications, and supervisors.
Some APIs, such as GenServers, make a clearer distinction between client and server, and we will explore them in future chapters. Next let's talk about naming things, applications, and supervisors.
2 changes: 1 addition & 1 deletion lib/elixir/pages/mix-and-otp/supervisor-and-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ end

Now run `mix test` again and our app should boot but we should see one failure. When we changed the `KV` module, we broke the boilerplate test case which tested the `KV.hello/0` function. You can simply remove that test case and we are back to a green suite.

We wrote very little code but we did something incredibly powerful. We now have a function, `KV.start/2` that is invoked whenever your application starts. This gives us the perfect place to start our key-value registry. The `Application` module also allows us to define a `stop/1` callback and other funtionality. You can check the `Application` and `Supervisor` modules for extensive documentation on their uses.
We wrote very little code but we did something incredibly powerful. We now have a function, `KV.start/2` that is invoked whenever your application starts. This gives us the perfect place to start our key-value registry. The `Application` module also allows us to define a `stop/1` callback and other functionality. You can check the `Application` and `Supervisor` modules for extensive documentation on their uses.

Let's finally start our registry.

Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/pages/references/patterns-and-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ iex> _
** (CompileError) iex:3: invalid use of _
```

A pinned value represents the value itself and not its – even if syntatically equal – pattern. The right hand side is compared to be equal to the pinned value:
A pinned value represents the value itself and not its – even if syntactically equal – pattern. The right hand side is compared to be equal to the pinned value:

```iex
iex> x = %{}
Expand Down