Skip to content

Commit

Permalink
Prefer more concise and cross-language ** operator over Integer.pow/2
Browse files Browse the repository at this point in the history
  • Loading branch information
codingthat authored Feb 12, 2025
1 parent ad095ee commit 7335f25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/concept/paint-by-number/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ PaintByNumber.palette_bit_size(13)
# => 4
```

Note: there is no `log2` function in the Elixir standard library. You will later learn how to use [Erlang libraries][erlang-libraries] from Elixir where you can find this function. Now, solve this task with recursion and the [`Integer.pow/2`][integer-pow] function instead.
Note: there is no `log2` function in the Elixir standard library. You will later learn how to use [Erlang libraries][erlang-libraries] from Elixir where you can find this function. Now, solve this task with recursion and the [power operator][power-operator] instead.

## 2. Create an empty picture

Expand Down Expand Up @@ -113,4 +113,4 @@ PaintByNumber.concat_pictures(picture1, picture2)
[paint-by-number]: https://en.wikipedia.org/wiki/Paint_by_number
[binary-file]: https://en.wikipedia.org/wiki/Binary_file
[erlang-libraries]: https://exercism.org/tracks/elixir/concepts/erlang-libraries
[integer-pow]: https://hexdocs.pm/elixir/Integer.html#pow/2
[power-operator]: https://hexdocs.pm/elixir/Kernel.html#**/2

0 comments on commit 7335f25

Please sign in to comment.