Skip to content

Commit

Permalink
Merge pull request #1024 from dr-acc/fix_typo
Browse files Browse the repository at this point in the history
16 Typo fixes
  • Loading branch information
BrooklinJazz committed Aug 1, 2023
2 parents 237f6a0 + 8cd6b75 commit 82fdece
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion exercises/group_project_blog.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ You may update your README as the project expands

## Protect Main

[Project your main branch](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) so that no one can push directly to main without a PR review.
[Protect your main branch](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) so that no one can push directly to main without a PR review.

This is a common safety mechanism used on most projects to ensure no one can accidentally write to the main branch without review by another member of the project.

Expand Down
2 changes: 1 addition & 1 deletion exercises/habit_tracker.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Enter your answer below.

## Progress Bar

Users define a a `goal` number of points to earn each day. Determine what percentage progress have they made if they would like to earn `40` points and have completed a `small` and a `medium` habit.
Users define a `goal` number of points to earn each day. Determine what percentage progress have they made if they would like to earn `40` points and have completed a `small` and a `medium` habit.

Remember that you can calculate percentage with $\frac{points}{goal} * 100$

Expand Down
4 changes: 2 additions & 2 deletions exercises/mazes.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ maze = %{

## The String Maze

Use use **map[key]** notation to access the maze and retrieve the `"Exit!"` string.
Use **map[key]** notation to access the maze and retrieve the `"Exit!"` string.

<!-- livebook:{"break_markdown":true} -->

Expand Down Expand Up @@ -201,7 +201,7 @@ treasure_map = %{

### (Extra Bonus) Update The Treasure Map

Use map update syntax to create a update the original `treasure_map` such that the `"gold"` is now `"taken"`.
Use map update syntax to create and update the original `treasure_map` such that the `"gold"` is now `"taken"`.

<details style="background-color: lightgreen; padding: 1rem; margin: 1rem 0;">
<summary>Example solution</summary>
Expand Down
2 changes: 1 addition & 1 deletion exercises/named_number_lists.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Mix.install([

## Named Number Lists

Generate a list with ten random integers from `0` to `9`. Convert each integer in this list to it's string representation so `1` would become `"one"`.
Generate a list with ten random integers from `0` to `9`. Convert each integer in this list to its string representation so `1` would become `"one"`.

<!-- livebook:{"force_markdown":true} -->

Expand Down
2 changes: 1 addition & 1 deletion exercises/phoenix_drills.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $ mix phx.new random_number --no-ecto

## Phoenix Navigation

Create a Pheonix application with three pages:
Create a Phoenix application with three pages:

* Home
* About
Expand Down
2 changes: 1 addition & 1 deletion reading/advanced_pattern_matching.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ We can use the match operator anytime we have a value bound to a parameter or va

<!-- livebook:{"break_markdown":true} -->

Create a `case` statement that will return the first element in a 2 element tuple, or the first element in 2 element a list.
Create a `case` statement that will return the first element in a 2 element tuple, or the first element in a 2 element list.

```elixir

Expand Down
4 changes: 2 additions & 2 deletions reading/apis.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ You can make a simple cURL request by typing the following in your command line.
curl https://www.example.com
```

It's important to understand cURL because most APIs include documentation using cURL requests examples and we can use these simple curl requests to test an API or know how to send a request in our chosen Elixir API Client.
It's important to understand cURL because most APIs include documentation using examples of cURL requests. We can use these simple cURL requests to test an API or know how to send a request using our chosen Elixir API Client.

Here, we use the [System](https://hexdocs.pm/elixir/System.html) module to simulate running a curl request from your command line and print the response for the sake of example. Notice it returns the HTML document of https://www.example.com.

Expand Down Expand Up @@ -196,7 +196,7 @@ You should see a response similar to the following:

## Authentication

APIs use different forms of authentication to check if a user is authorized to access certain resources. Typically most forms auth authentication use some kind of access token to identify the user accessing the resource. Public APIs will not require any kind of access token, while private APIs will.
APIs use different forms of authentication to check if a user is authorized to access certain resources. Typically most forms of authentication use some kind of access token to identify the user accessing the resource. Public APIs will not require any kind of access token, while private APIs will.

<!-- livebook:{"break_markdown":true} -->

Expand Down
2 changes: 1 addition & 1 deletion reading/built-in_modules.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ tuple = {0, 4, 1, 100, 5, 7}

## Checking Types

[Kernel](https://hexdocs.pm/elixir/Kernel.html) contains many functions for determining a values type such as `is_atom/1`, `is_binary/1`, `is_map/1`, and `is_integer/1`.
[Kernel](https://hexdocs.pm/elixir/Kernel.html) contains many functions for determining a value's type such as `is_atom/1`, `is_binary/1`, `is_map/1`, and `is_integer/1`.

```elixir
true = Kernel.is_map(%{})
Expand Down
4 changes: 2 additions & 2 deletions reading/modules.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ ThoughtfulSpeaker.speak()

## Callback Functions

Similar to anonymous functions, we can pass named functions as callback functions, however we have to explicitly provide the functions arity using the capture operator `&`.
Similar to anonymous functions, we can pass named functions as callback functions, however we have to explicitly provide the function's arity using the capture operator `&`.

```elixir
defmodule HigherOrder do
Expand Down Expand Up @@ -681,7 +681,7 @@ You can use this feedback to debug your exercises.

### Your Turn

Fix the failing `DoctestFailure` module so that it's doctests pass.
Fix the failing `DoctestFailure` module so that its doctests pass.

<!-- livebook:{"break_markdown":true} -->

Expand Down
4 changes: 2 additions & 2 deletions reading/reduce.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ If there is an existing key, then it can update the map key using the existing v
Map.update(updated_map, :key, "default value", fn current -> "updated: #{current}" end)
```

When converting a string to a map of character counts, If there is no key, the value will be `1`. If there is an existing key in the map, the value will be the current value incremented by `1`. Here are the steps we want to accomplish for our [Enum.reduce/3](https://hexdocs.pm/elixir/Enum.html#reduce/3) function.
When converting a string to a map of character counts, if there is no key, the value will be `1`. If there is an existing key in the map, the value will be the current value incremented by `1`. Here are the steps we want to accomplish for our [Enum.reduce/3](https://hexdocs.pm/elixir/Enum.html#reduce/3) function.

```elixir
initial_accumulator = %{}
Expand All @@ -169,7 +169,7 @@ step2 = Map.update(step1, "b", 1, fn current_value -> current_value + 1 end)
step3 = Map.update(step2, "a", 1, fn current_value -> current_value + 1 end)
```

Putting this all together, here's the [Enum.reduce/3](https://hexdocs.pm/elixir/Enum.html#reduce/3) function that let's us convert a string into a map with character counts. Note that we have to split the string into a list of characters first to make it enumerable.
Putting this all together, here's the [Enum.reduce/3](https://hexdocs.pm/elixir/Enum.html#reduce/3) function that lets us convert a string into a map with character counts. Note that we have to split the string into a list of characters first to make it enumerable.

```elixir
split_string = String.split("aba", "", trim: true)
Expand Down
2 changes: 1 addition & 1 deletion reading/regex.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Here are a few patterns to get you started.
Often capitalizing backslash characters inverts their purpose.

`\D` non-digit character.
`W` non-word character.
`\W` non-word character.
`\S` non-whitespace character.

<!-- livebook:{"break_markdown":true} -->
Expand Down
2 changes: 1 addition & 1 deletion reading/strings_and_binaries.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ bit_size("hello")
byte_size("hello")
```

We can use [IO.inspect/2](https://hexdocs.pm/elixir/IO.html#inspect/2) with the `:as_binaries` option to display a value as it's binary
We can use [IO.inspect/2](https://hexdocs.pm/elixir/IO.html#inspect/2) with the `:as_binaries` option to display a value as its binary
representation.

Notice these are the code points for each character.
Expand Down

0 comments on commit 82fdece

Please sign in to comment.