diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5958d2fd1..a40b9f7074 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,8 +76,6 @@ jobs: strategy: matrix: include: - - elixir: '1.12.0' - otp: '24.0' - elixir: '1.13.0' otp: '24.1' - elixir: '1.14.0' diff --git a/README.md b/README.md index 7cbc883f7b..958c2d7b66 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Setup -The exercises currently target Elixir versions from 1.12 to 1.17 and Erlang/OTP versions from 24 to 27. Detailed installation instructions can be found at +The exercises currently target Elixir versions from 1.13 to 1.17 and Erlang/OTP versions from 24 to 27. Detailed installation instructions can be found at [https://elixir-lang.org/install.html](https://elixir-lang.org/install.html). We recommend using the [asdf version manager](https://github.com/asdf-vm/asdf) to manage multiple Elixir versions. ## Testing diff --git a/bin/bootstrap_practice_exercise.exs b/bin/bootstrap_practice_exercise.exs index 7c1bacd386..94cc5d4bc8 100644 --- a/bin/bootstrap_practice_exercise.exs +++ b/bin/bootstrap_practice_exercise.exs @@ -167,7 +167,6 @@ defmodule #{module}.MixProject do [ app: :#{exercise_snake_case}, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/bin/fetch-configlet b/bin/fetch-configlet index 4800e15084..6bef43ab72 100755 --- a/bin/fetch-configlet +++ b/bin/fetch-configlet @@ -24,10 +24,11 @@ get_download_url() { local latest='https://api.github.com/repos/exercism/configlet/releases/latest' local arch case "$(uname -m)" in - x86_64) arch='x86-64' ;; - *686*) arch='i386' ;; - *386*) arch='i386' ;; - *) arch='x86-64' ;; + aarch64|arm64) arch='arm64' ;; + x86_64) arch='x86-64' ;; + *686*) arch='i386' ;; + *386*) arch='i386' ;; + *) arch='x86-64' ;; esac local suffix="${os}_${arch}.${ext}" curl "${curlopts[@]}" --header 'Accept: application/vnd.github.v3+json' "${latest}" | @@ -47,7 +48,7 @@ main() { fi local os - case "$(uname)" in + case "$(uname -s)" in Darwin*) os='macos' ;; Linux*) os='linux' ;; Windows*) os='windows' ;; @@ -58,8 +59,8 @@ main() { local ext case "${os}" in - windows*) ext='zip' ;; - *) ext='tar.gz' ;; + windows) ext='zip' ;; + *) ext='tar.gz' ;; esac echo "Fetching configlet..." >&2 @@ -69,16 +70,16 @@ main() { curl "${curlopts[@]}" --output "${output_path}" "${download_url}" case "${ext}" in - *zip) unzip "${output_path}" -d "${output_dir}" ;; - *) tar xzf "${output_path}" -C "${output_dir}" ;; + zip) unzip "${output_path}" -d "${output_dir}" ;; + *) tar xzf "${output_path}" -C "${output_dir}" ;; esac rm -f "${output_path}" local executable_ext case "${os}" in - windows*) executable_ext='.exe' ;; - *) executable_ext='' ;; + windows) executable_ext='.exe' ;; + *) executable_ext='' ;; esac local configlet_path="${output_dir}/configlet${executable_ext}" diff --git a/exercises/concept/basketball-website/.meta/config.json b/exercises/concept/basketball-website/.meta/config.json index ec5f0898ef..fb778be189 100644 --- a/exercises/concept/basketball-website/.meta/config.json +++ b/exercises/concept/basketball-website/.meta/config.json @@ -17,6 +17,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about Access Behaviour by helping extract deeply nested data for the basketball team's website." } diff --git a/exercises/concept/basketball-website/mix.exs b/exercises/concept/basketball-website/mix.exs index e653239537..a80a337a2f 100644 --- a/exercises/concept/basketball-website/mix.exs +++ b/exercises/concept/basketball-website/mix.exs @@ -5,7 +5,6 @@ defmodule BasketballWebsite.MixProject do [ app: :basketball_website, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/bird-count/.meta/config.json b/exercises/concept/bird-count/.meta/config.json index 92f6ab9c1a..516506c625 100644 --- a/exercises/concept/bird-count/.meta/config.json +++ b/exercises/concept/bird-count/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "csharp/bird-watcher" ], diff --git a/exercises/concept/bird-count/mix.exs b/exercises/concept/bird-count/mix.exs index 45a0416247..317cfda52f 100644 --- a/exercises/concept/bird-count/mix.exs +++ b/exercises/concept/bird-count/mix.exs @@ -5,7 +5,6 @@ defmodule BirdCount.MixProject do [ app: :bird_count, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/boutique-inventory/.meta/config.json b/exercises/concept/boutique-inventory/.meta/config.json index 744fe2532e..8196e2bf7f 100644 --- a/exercises/concept/boutique-inventory/.meta/config.json +++ b/exercises/concept/boutique-inventory/.meta/config.json @@ -17,6 +17,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about the Enum module by preparing your fashion boutique for the big annual sale." } diff --git a/exercises/concept/boutique-inventory/mix.exs b/exercises/concept/boutique-inventory/mix.exs index 86e51d0904..4528d07b6b 100644 --- a/exercises/concept/boutique-inventory/mix.exs +++ b/exercises/concept/boutique-inventory/mix.exs @@ -5,7 +5,6 @@ defmodule BoutiqueInventory.MixProject do [ app: :boutique_inventory, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/boutique-suggestions/.meta/config.json b/exercises/concept/boutique-suggestions/.meta/config.json index 34bcc79cda..a385752a3f 100644 --- a/exercises/concept/boutique-suggestions/.meta/config.json +++ b/exercises/concept/boutique-suggestions/.meta/config.json @@ -17,6 +17,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about list comprehensions by generating outfit suggestions for the clients of your fashion boutique." } diff --git a/exercises/concept/boutique-suggestions/mix.exs b/exercises/concept/boutique-suggestions/mix.exs index 7ae91f1d06..268457877d 100644 --- a/exercises/concept/boutique-suggestions/mix.exs +++ b/exercises/concept/boutique-suggestions/mix.exs @@ -5,7 +5,6 @@ defmodule BoutiqueSuggestions.MixProject do [ app: :boutique_suggestions, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/bread-and-potions/.meta/config.json b/exercises/concept/bread-and-potions/.meta/config.json index 57ee8291e1..cdbf8350ce 100644 --- a/exercises/concept/bread-and-potions/.meta/config.json +++ b/exercises/concept/bread-and-potions/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about protocols by developing your own role-playing video game." } diff --git a/exercises/concept/bread-and-potions/mix.exs b/exercises/concept/bread-and-potions/mix.exs index c8fb4bbc79..7c5ee95599 100644 --- a/exercises/concept/bread-and-potions/mix.exs +++ b/exercises/concept/bread-and-potions/mix.exs @@ -5,7 +5,6 @@ defmodule RPG.MixProject do [ app: :bread_and_potions, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/captains-log/.meta/config.json b/exercises/concept/captains-log/.meta/config.json index ac9a502097..02eca9bfb9 100644 --- a/exercises/concept/captains-log/.meta/config.json +++ b/exercises/concept/captains-log/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about randomness and using Erlang libraries from Elixir by helping Mary generate stardates and starship registry numbers for her Star Trek themed pen-and-paper role playing sessions." } diff --git a/exercises/concept/captains-log/mix.exs b/exercises/concept/captains-log/mix.exs index dd2a693c4d..1fb610fabb 100644 --- a/exercises/concept/captains-log/mix.exs +++ b/exercises/concept/captains-log/mix.exs @@ -5,7 +5,6 @@ defmodule CaptainsLog.MixProject do [ app: :captains_log, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/chessboard/.meta/config.json b/exercises/concept/chessboard/.meta/config.json index 75e1bae89f..0ba8f36b25 100644 --- a/exercises/concept/chessboard/.meta/config.json +++ b/exercises/concept/chessboard/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about ranges by generating a chessboard." } diff --git a/exercises/concept/chessboard/mix.exs b/exercises/concept/chessboard/mix.exs index e790271550..3d433e07d8 100644 --- a/exercises/concept/chessboard/mix.exs +++ b/exercises/concept/chessboard/mix.exs @@ -5,7 +5,6 @@ defmodule Chessboard.MixProject do [ app: :chessboard, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/city-office/.meta/config.json b/exercises/concept/city-office/.meta/config.json index eb609d4fa8..2e37e32792 100644 --- a/exercises/concept/city-office/.meta/config.json +++ b/exercises/concept/city-office/.meta/config.json @@ -17,6 +17,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about writing documentation and typespecs by getting your code ready for the arrival of a new colleague at the city office." } diff --git a/exercises/concept/city-office/mix.exs b/exercises/concept/city-office/mix.exs index 9e8d8280cc..c3056e3113 100644 --- a/exercises/concept/city-office/mix.exs +++ b/exercises/concept/city-office/mix.exs @@ -5,7 +5,6 @@ defmodule Form.MixProject do [ app: :city_office, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/community-garden/.meta/config.json b/exercises/concept/community-garden/.meta/config.json index e8bbe5ef12..7d4a55f09d 100644 --- a/exercises/concept/community-garden/.meta/config.json +++ b/exercises/concept/community-garden/.meta/config.json @@ -20,6 +20,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about the Agent module by helping your local community handle community garden registrations." } diff --git a/exercises/concept/community-garden/mix.exs b/exercises/concept/community-garden/mix.exs index 9577ef2acb..a3c65198db 100644 --- a/exercises/concept/community-garden/mix.exs +++ b/exercises/concept/community-garden/mix.exs @@ -5,7 +5,6 @@ defmodule CommunityGarden.MixProject do [ app: :community_garden, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/dancing-dots/.meta/config.json b/exercises/concept/dancing-dots/.meta/config.json index a46670b62d..7177ac3916 100644 --- a/exercises/concept/dancing-dots/.meta/config.json +++ b/exercises/concept/dancing-dots/.meta/config.json @@ -20,6 +20,5 @@ "lib/dancing_dots/dot_group.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about behaviours by writing animations for dot-based generative art." } diff --git a/exercises/concept/dancing-dots/mix.exs b/exercises/concept/dancing-dots/mix.exs index 714514ea06..cb1cb3e22d 100644 --- a/exercises/concept/dancing-dots/mix.exs +++ b/exercises/concept/dancing-dots/mix.exs @@ -5,7 +5,6 @@ defmodule DancingDots.MixProject do [ app: :dancing_dots, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/date-parser/.meta/config.json b/exercises/concept/date-parser/.meta/config.json index be98356adc..2af9853878 100644 --- a/exercises/concept/date-parser/.meta/config.json +++ b/exercises/concept/date-parser/.meta/config.json @@ -17,6 +17,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about regular expressions by parsing dates." } diff --git a/exercises/concept/date-parser/mix.exs b/exercises/concept/date-parser/mix.exs index a1c27479c8..2ce0f9052d 100644 --- a/exercises/concept/date-parser/mix.exs +++ b/exercises/concept/date-parser/mix.exs @@ -5,7 +5,6 @@ defmodule DateParser.MixProject do [ app: :date_parser, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/dna-encoding/.meta/config.json b/exercises/concept/dna-encoding/.meta/config.json index c5039fb8ef..8d528e7d79 100644 --- a/exercises/concept/dna-encoding/.meta/config.json +++ b/exercises/concept/dna-encoding/.meta/config.json @@ -17,6 +17,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about bitstrings and tail call recursion by encoding DNA sequences as binary data." } diff --git a/exercises/concept/dna-encoding/mix.exs b/exercises/concept/dna-encoding/mix.exs index b3224461ec..85fe8dcfd4 100644 --- a/exercises/concept/dna-encoding/mix.exs +++ b/exercises/concept/dna-encoding/mix.exs @@ -5,7 +5,6 @@ defmodule DNA.MixProject do [ app: :dna, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/file-sniffer/.meta/config.json b/exercises/concept/file-sniffer/.meta/config.json index 768cc2f221..b005d18971 100644 --- a/exercises/concept/file-sniffer/.meta/config.json +++ b/exercises/concept/file-sniffer/.meta/config.json @@ -17,6 +17,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about binaries by verifying the mime type of files uploaded to your server." } diff --git a/exercises/concept/file-sniffer/mix.exs b/exercises/concept/file-sniffer/mix.exs index 54d2aa30bf..7163699390 100644 --- a/exercises/concept/file-sniffer/mix.exs +++ b/exercises/concept/file-sniffer/mix.exs @@ -5,7 +5,6 @@ defmodule FileSniffer.MixProject do [ app: :file_sniffer, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/freelancer-rates/.meta/config.json b/exercises/concept/freelancer-rates/.meta/config.json index 541b4f4698..ecb55d0408 100644 --- a/exercises/concept/freelancer-rates/.meta/config.json +++ b/exercises/concept/freelancer-rates/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "javascript/freelancer-rates" ], diff --git a/exercises/concept/freelancer-rates/mix.exs b/exercises/concept/freelancer-rates/mix.exs index 830f405b77..b5c4dd3678 100644 --- a/exercises/concept/freelancer-rates/mix.exs +++ b/exercises/concept/freelancer-rates/mix.exs @@ -5,7 +5,6 @@ defmodule FreelancerRates.MixProject do [ app: :freelancer_rates, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/german-sysadmin/.meta/config.json b/exercises/concept/german-sysadmin/.meta/config.json index 409c84283c..61c4d7aecc 100644 --- a/exercises/concept/german-sysadmin/.meta/config.json +++ b/exercises/concept/german-sysadmin/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about charlists and the case conditional expression by sanitizing usernames of employees in a German company." } diff --git a/exercises/concept/german-sysadmin/mix.exs b/exercises/concept/german-sysadmin/mix.exs index 5136c70fd1..0c3725e565 100644 --- a/exercises/concept/german-sysadmin/mix.exs +++ b/exercises/concept/german-sysadmin/mix.exs @@ -5,7 +5,6 @@ defmodule Username.MixProject do [ app: :german_sysadmin, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/guessing-game/.meta/config.json b/exercises/concept/guessing-game/.meta/config.json index a76dc72f90..dc70f034b6 100644 --- a/exercises/concept/guessing-game/.meta/config.json +++ b/exercises/concept/guessing-game/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "fsharp/guessing-game" ], diff --git a/exercises/concept/guessing-game/mix.exs b/exercises/concept/guessing-game/mix.exs index 6911be3658..c671e2683f 100644 --- a/exercises/concept/guessing-game/mix.exs +++ b/exercises/concept/guessing-game/mix.exs @@ -5,7 +5,6 @@ defmodule GuessingGame.MixProject do [ app: :guessing_game, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/high-school-sweetheart/.meta/config.json b/exercises/concept/high-school-sweetheart/.meta/config.json index 7d6cde7b22..deb2a1c355 100644 --- a/exercises/concept/high-school-sweetheart/.meta/config.json +++ b/exercises/concept/high-school-sweetheart/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "icon": "high-school-sweethearts", "blurb": "Learn about strings and the pipe operator by helping high school sweethearts profess their love on social media via ASCII art." } diff --git a/exercises/concept/high-school-sweetheart/mix.exs b/exercises/concept/high-school-sweetheart/mix.exs index 1282d5d479..c6143d302e 100644 --- a/exercises/concept/high-school-sweetheart/mix.exs +++ b/exercises/concept/high-school-sweetheart/mix.exs @@ -5,7 +5,6 @@ defmodule HighSchoolSweetheart.MixProject do [ app: :high_school_sweetheart, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/high-score/.meta/config.json b/exercises/concept/high-score/.meta/config.json index 947ae73cd4..5efe08add1 100644 --- a/exercises/concept/high-score/.meta/config.json +++ b/exercises/concept/high-score/.meta/config.json @@ -13,7 +13,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "icon": "high-scores", "blurb": "Learn about maps by keeping track of the high scores in your local arcade hall." } diff --git a/exercises/concept/high-score/mix.exs b/exercises/concept/high-score/mix.exs index 896cd6410e..d1118c177c 100644 --- a/exercises/concept/high-score/mix.exs +++ b/exercises/concept/high-score/mix.exs @@ -5,7 +5,6 @@ defmodule HighScore.MixProject do [ app: :high_score, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/kitchen-calculator/.meta/config.json b/exercises/concept/kitchen-calculator/.meta/config.json index 957060f174..22707b500e 100644 --- a/exercises/concept/kitchen-calculator/.meta/config.json +++ b/exercises/concept/kitchen-calculator/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about tuples and pattern matching by converting common US baking measurements to the metric system." } diff --git a/exercises/concept/kitchen-calculator/mix.exs b/exercises/concept/kitchen-calculator/mix.exs index f27d87b40d..56c8b978e5 100644 --- a/exercises/concept/kitchen-calculator/mix.exs +++ b/exercises/concept/kitchen-calculator/mix.exs @@ -5,7 +5,6 @@ defmodule KitchenCalculator.MixProject do [ app: :kitchen_calculator, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/language-list/.meta/config.json b/exercises/concept/language-list/.meta/config.json index c87ffb7020..be735c0e71 100644 --- a/exercises/concept/language-list/.meta/config.json +++ b/exercises/concept/language-list/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "clojure/tracks-on-tracks-on-tracks" ], diff --git a/exercises/concept/language-list/mix.exs b/exercises/concept/language-list/mix.exs index 2d50d7ad31..e40eb07411 100644 --- a/exercises/concept/language-list/mix.exs +++ b/exercises/concept/language-list/mix.exs @@ -5,7 +5,6 @@ defmodule LanguageList.MixProject do [ app: :language_list, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/lasagna/.meta/config.json b/exercises/concept/lasagna/.meta/config.json index 2672002000..82577602a4 100644 --- a/exercises/concept/lasagna/.meta/config.json +++ b/exercises/concept/lasagna/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "csharp/lucians-luscious-lasagna" ], diff --git a/exercises/concept/lasagna/mix.exs b/exercises/concept/lasagna/mix.exs index 09705834a1..ad7910c22c 100644 --- a/exercises/concept/lasagna/mix.exs +++ b/exercises/concept/lasagna/mix.exs @@ -5,7 +5,6 @@ defmodule Lasagna.MixProject do [ app: :lasagna, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/library-fees/.meta/config.json b/exercises/concept/library-fees/.meta/config.json index 060a2ecb8c..515a3608ae 100644 --- a/exercises/concept/library-fees/.meta/config.json +++ b/exercises/concept/library-fees/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about dates and time by calculating late fees for the local library." } diff --git a/exercises/concept/library-fees/mix.exs b/exercises/concept/library-fees/mix.exs index 2c859d3704..cec9d6da83 100644 --- a/exercises/concept/library-fees/mix.exs +++ b/exercises/concept/library-fees/mix.exs @@ -5,7 +5,6 @@ defmodule LibraryFees.MixProject do [ app: :library_fees, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/log-level/.meta/config.json b/exercises/concept/log-level/.meta/config.json index bd25fce729..702098dd18 100644 --- a/exercises/concept/log-level/.meta/config.json +++ b/exercises/concept/log-level/.meta/config.json @@ -13,7 +13,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "csharp/logs-logs-logs" ], diff --git a/exercises/concept/log-level/mix.exs b/exercises/concept/log-level/mix.exs index 46d643db5f..0c709f6345 100644 --- a/exercises/concept/log-level/mix.exs +++ b/exercises/concept/log-level/mix.exs @@ -5,7 +5,6 @@ defmodule LogLevel.MixProject do [ app: :log_level, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/log-parser/.meta/config.json b/exercises/concept/log-parser/.meta/config.json index 32ffb975d3..51d53b7b6d 100644 --- a/exercises/concept/log-parser/.meta/config.json +++ b/exercises/concept/log-parser/.meta/config.json @@ -13,7 +13,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "go/parsing-log-files" ], diff --git a/exercises/concept/log-parser/mix.exs b/exercises/concept/log-parser/mix.exs index 3e208a9e8b..6ee625ccbb 100644 --- a/exercises/concept/log-parser/mix.exs +++ b/exercises/concept/log-parser/mix.exs @@ -5,7 +5,6 @@ defmodule LogParser.MixProject do [ app: :log_parser, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/lucas-numbers/.meta/config.json b/exercises/concept/lucas-numbers/.meta/config.json index 3434023dd6..aa31de1782 100644 --- a/exercises/concept/lucas-numbers/.meta/config.json +++ b/exercises/concept/lucas-numbers/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about streams by generating the Lucas number sequence." } diff --git a/exercises/concept/lucas-numbers/mix.exs b/exercises/concept/lucas-numbers/mix.exs index 8cd4830a76..bb1f162066 100644 --- a/exercises/concept/lucas-numbers/mix.exs +++ b/exercises/concept/lucas-numbers/mix.exs @@ -5,7 +5,6 @@ defmodule LucasNumbers.MixProject do [ app: :lucas_numbers, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/mensch-aergere-dich-nicht/.meta/config.json b/exercises/concept/mensch-aergere-dich-nicht/.meta/config.json index fe63f3b27e..0c4743e1fd 100644 --- a/exercises/concept/mensch-aergere-dich-nicht/.meta/config.json +++ b/exercises/concept/mensch-aergere-dich-nicht/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "no-op" } diff --git a/exercises/concept/mensch-aergere-dich-nicht/mix.exs b/exercises/concept/mensch-aergere-dich-nicht/mix.exs index b3b31e6dda..e491916b2e 100644 --- a/exercises/concept/mensch-aergere-dich-nicht/mix.exs +++ b/exercises/concept/mensch-aergere-dich-nicht/mix.exs @@ -5,7 +5,6 @@ defmodule MenschAergereDichNicht.MixProject do [ app: :mensch_aergere_dich_nicht, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/name-badge/.meta/config.json b/exercises/concept/name-badge/.meta/config.json index d4f1cbefb2..ce3369127f 100644 --- a/exercises/concept/name-badge/.meta/config.json +++ b/exercises/concept/name-badge/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "csharp/tim-from-marketing" ], diff --git a/exercises/concept/name-badge/mix.exs b/exercises/concept/name-badge/mix.exs index 2709c17370..97c49fed67 100644 --- a/exercises/concept/name-badge/mix.exs +++ b/exercises/concept/name-badge/mix.exs @@ -5,7 +5,6 @@ defmodule NameBadge.MixProject do [ app: :name_badge, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/need-for-speed/.meta/config.json b/exercises/concept/need-for-speed/.meta/config.json index db08d8235f..b24399ab24 100644 --- a/exercises/concept/need-for-speed/.meta/config.json +++ b/exercises/concept/need-for-speed/.meta/config.json @@ -20,7 +20,6 @@ "lib/need_for_speed/remote_control_car.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "csharp/need-for-speed" ], diff --git a/exercises/concept/need-for-speed/mix.exs b/exercises/concept/need-for-speed/mix.exs index 798f006a69..d0c0b26f4b 100644 --- a/exercises/concept/need-for-speed/mix.exs +++ b/exercises/concept/need-for-speed/mix.exs @@ -5,7 +5,6 @@ defmodule RemoteControlCar.MixProject do [ app: :need_for_speed, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/new-passport/.meta/config.json b/exercises/concept/new-passport/.meta/config.json index f5ca7054f5..0c54b115b5 100644 --- a/exercises/concept/new-passport/.meta/config.json +++ b/exercises/concept/new-passport/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about `with` to concentrate on the happy path and manage a stressful day of facing bureaucracy." } diff --git a/exercises/concept/new-passport/mix.exs b/exercises/concept/new-passport/mix.exs index 5c0bac2f21..a9ecf68da3 100644 --- a/exercises/concept/new-passport/mix.exs +++ b/exercises/concept/new-passport/mix.exs @@ -5,7 +5,6 @@ defmodule NewPassport.MixProject do [ app: :new_passport, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/newsletter/.meta/config.json b/exercises/concept/newsletter/.meta/config.json index 6fb0b15f6e..46d09284f7 100644 --- a/exercises/concept/newsletter/.meta/config.json +++ b/exercises/concept/newsletter/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about working with files by sending out a newsletter." } diff --git a/exercises/concept/newsletter/mix.exs b/exercises/concept/newsletter/mix.exs index 93fb4fb973..c5fb71f03a 100644 --- a/exercises/concept/newsletter/mix.exs +++ b/exercises/concept/newsletter/mix.exs @@ -5,7 +5,6 @@ defmodule Newsletter.MixProject do [ app: :newsletter, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/pacman-rules/.meta/config.json b/exercises/concept/pacman-rules/.meta/config.json index d54d621e0f..8d87c74a88 100644 --- a/exercises/concept/pacman-rules/.meta/config.json +++ b/exercises/concept/pacman-rules/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about booleans by implementing the rules of the Pac-Man game." } diff --git a/exercises/concept/pacman-rules/mix.exs b/exercises/concept/pacman-rules/mix.exs index f592497d5d..eceab6865d 100644 --- a/exercises/concept/pacman-rules/mix.exs +++ b/exercises/concept/pacman-rules/mix.exs @@ -5,7 +5,6 @@ defmodule Rules.MixProject do [ app: :pacman_rules, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/paint-by-number/.docs/instructions.md b/exercises/concept/paint-by-number/.docs/instructions.md index 94a7415f98..c1c1cb0a1f 100644 --- a/exercises/concept/paint-by-number/.docs/instructions.md +++ b/exercises/concept/paint-by-number/.docs/instructions.md @@ -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. If you're solving this exercise on your own computer using an older Elixir version (1.11 or lower) that doesn't have `Integer.pow/2` function, use the `Math.pow/2` function we provided in the `lib/math.ex` file for this exercise. +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. ## 2. Create an empty picture diff --git a/exercises/concept/paint-by-number/.meta/config.json b/exercises/concept/paint-by-number/.meta/config.json index a76aee7021..e7470127fa 100644 --- a/exercises/concept/paint-by-number/.meta/config.json +++ b/exercises/concept/paint-by-number/.meta/config.json @@ -17,11 +17,7 @@ ], "exemplar": [ ".meta/exemplar.ex" - ], - "editor": [ - "lib/math.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about bitstrings by creating binary files with pictures for a paint-by-number app." } diff --git a/exercises/concept/paint-by-number/.meta/exemplar.ex b/exercises/concept/paint-by-number/.meta/exemplar.ex index c25338c267..0bb1478748 100644 --- a/exercises/concept/paint-by-number/.meta/exemplar.ex +++ b/exercises/concept/paint-by-number/.meta/exemplar.ex @@ -4,7 +4,7 @@ defmodule PaintByNumber do end defp do_palette_bit_size(color_count, bits \\ 1) do - if Math.pow(2, bits) >= color_count do + if Integer.pow(2, bits) >= color_count do bits else do_palette_bit_size(color_count, bits + 1) diff --git a/exercises/concept/paint-by-number/lib/math.ex b/exercises/concept/paint-by-number/lib/math.ex deleted file mode 100644 index 7f04d9da6d..0000000000 --- a/exercises/concept/paint-by-number/lib/math.ex +++ /dev/null @@ -1,18 +0,0 @@ -# You can ignore this file if you're solving this exercise in the web editor, -# or on your own computer if you have Elixir version 1.12 or higher. -# You can check which Elixir version you have by running `elixir -v` in your terminal. -defmodule Math do - import Bitwise - - # copied from https://github.com/elixir-lang/elixir/blob/v1.12.0/lib/elixir/lib/integer.ex#L103-L114 - def pow(base, exponent) when is_integer(base) and is_integer(exponent) do - if exponent < 0, do: raise("exponent cannot be negative") - guarded_pow(base, exponent) - end - - # https://en.wikipedia.org/wiki/Exponentiation_by_squaring - defp guarded_pow(_, 0), do: 1 - defp guarded_pow(b, 1), do: b - defp guarded_pow(b, e) when (e &&& 1) == 0, do: guarded_pow(b * b, e >>> 1) - defp guarded_pow(b, e), do: b * guarded_pow(b * b, e >>> 1) -end diff --git a/exercises/concept/paint-by-number/mix.exs b/exercises/concept/paint-by-number/mix.exs index dc252d97c2..baaa1428ef 100644 --- a/exercises/concept/paint-by-number/mix.exs +++ b/exercises/concept/paint-by-number/mix.exs @@ -5,7 +5,6 @@ defmodule PaintByNumber.MixProject do [ app: :paint_by_number, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/remote-control-car/.meta/config.json b/exercises/concept/remote-control-car/.meta/config.json index 1c837b9522..63363aebbd 100644 --- a/exercises/concept/remote-control-car/.meta/config.json +++ b/exercises/concept/remote-control-car/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "forked_from": [ "csharp/elons-toys" ], diff --git a/exercises/concept/remote-control-car/mix.exs b/exercises/concept/remote-control-car/mix.exs index 6d49c1da4c..9e32ce8c15 100644 --- a/exercises/concept/remote-control-car/mix.exs +++ b/exercises/concept/remote-control-car/mix.exs @@ -5,7 +5,6 @@ defmodule RemoteControlCar.MixProject do [ app: :remote_control_car, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/rpg-character-sheet/.meta/config.json b/exercises/concept/rpg-character-sheet/.meta/config.json index 0a44692c48..bea7631fe9 100644 --- a/exercises/concept/rpg-character-sheet/.meta/config.json +++ b/exercises/concept/rpg-character-sheet/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "icon": "wizards-and-warriors", "blurb": "Learn about IO (input/output) by guiding your friends through the character creation process for your pen-and-paper role-playing game." } diff --git a/exercises/concept/rpg-character-sheet/mix.exs b/exercises/concept/rpg-character-sheet/mix.exs index 408f46271f..92c3732b63 100644 --- a/exercises/concept/rpg-character-sheet/mix.exs +++ b/exercises/concept/rpg-character-sheet/mix.exs @@ -5,7 +5,6 @@ defmodule RPG.MixProject do [ app: :rpg_character_sheet, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/rpn-calculator-inspection/.meta/config.json b/exercises/concept/rpn-calculator-inspection/.meta/config.json index 985fd08c6b..5e83e2d29b 100644 --- a/exercises/concept/rpn-calculator-inspection/.meta/config.json +++ b/exercises/concept/rpn-calculator-inspection/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "icon": "instruments-of-texas", "blurb": "Learn about tasks and links by inspecting a working prototype of your experimental Reverse Polish Notation calculator." } diff --git a/exercises/concept/rpn-calculator-inspection/mix.exs b/exercises/concept/rpn-calculator-inspection/mix.exs index dcc0cbf48b..2d2d2f881c 100644 --- a/exercises/concept/rpn-calculator-inspection/mix.exs +++ b/exercises/concept/rpn-calculator-inspection/mix.exs @@ -5,7 +5,6 @@ defmodule RPNCalculator.MixProject do [ app: :rpn_calculator_inspection, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/rpn-calculator-output/.meta/config.json b/exercises/concept/rpn-calculator-output/.meta/config.json index 0316057463..466d9dc78b 100644 --- a/exercises/concept/rpn-calculator-output/.meta/config.json +++ b/exercises/concept/rpn-calculator-output/.meta/config.json @@ -17,7 +17,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "icon": "calculator-conundrum", "blurb": "Learn about dynamic dispatch and advanced options for rescuing errors by implementing an output in your experimental Reverse Polish Notation calculator." } diff --git a/exercises/concept/rpn-calculator-output/mix.exs b/exercises/concept/rpn-calculator-output/mix.exs index 178627d2a1..251faad906 100644 --- a/exercises/concept/rpn-calculator-output/mix.exs +++ b/exercises/concept/rpn-calculator-output/mix.exs @@ -5,7 +5,6 @@ defmodule RPNCalculator.MixProject do [ app: :rpn_calculator_output, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/rpn-calculator/.meta/config.json b/exercises/concept/rpn-calculator/.meta/config.json index 3767236b59..a8190b252b 100644 --- a/exercises/concept/rpn-calculator/.meta/config.json +++ b/exercises/concept/rpn-calculator/.meta/config.json @@ -17,7 +17,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "icon": "instruments-of-texas", "blurb": "Learn about errors and rescuing them by working on an experimental Reverse Polish Notation calculator." } diff --git a/exercises/concept/rpn-calculator/mix.exs b/exercises/concept/rpn-calculator/mix.exs index de2dbe180d..5bbcbec57a 100644 --- a/exercises/concept/rpn-calculator/mix.exs +++ b/exercises/concept/rpn-calculator/mix.exs @@ -5,7 +5,6 @@ defmodule RPNCalculator.MixProject do [ app: :rpn_calculator, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/secrets/.meta/config.json b/exercises/concept/secrets/.meta/config.json index fc9f708c5e..f6830a88c7 100644 --- a/exercises/concept/secrets/.meta/config.json +++ b/exercises/concept/secrets/.meta/config.json @@ -13,6 +13,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about bit manipulation and anonymous functions by writing the software for an encryption device." } diff --git a/exercises/concept/secrets/.meta/exemplar.ex b/exercises/concept/secrets/.meta/exemplar.ex index d484def837..07555f5722 100644 --- a/exercises/concept/secrets/.meta/exemplar.ex +++ b/exercises/concept/secrets/.meta/exemplar.ex @@ -1,7 +1,4 @@ defmodule Secrets do - # only needed for Elixir < 1.10 - require Bitwise - def secret_add(secret) do fn x -> x + secret end end diff --git a/exercises/concept/secrets/mix.exs b/exercises/concept/secrets/mix.exs index ebcba98f10..f00b334c92 100644 --- a/exercises/concept/secrets/mix.exs +++ b/exercises/concept/secrets/mix.exs @@ -5,7 +5,6 @@ defmodule Secrets.MixProject do [ app: :secrets, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/stack-underflow/.meta/config.json b/exercises/concept/stack-underflow/.meta/config.json index 8f7f2bcc93..99afd86c5e 100644 --- a/exercises/concept/stack-underflow/.meta/config.json +++ b/exercises/concept/stack-underflow/.meta/config.json @@ -16,7 +16,6 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "icon": "error-handling", "blurb": "Learn about defining custom exceptions by continuing work on your experimental Reverse Polish Notation calculator." } diff --git a/exercises/concept/stack-underflow/mix.exs b/exercises/concept/stack-underflow/mix.exs index 12236d0622..2e90552a02 100644 --- a/exercises/concept/stack-underflow/mix.exs +++ b/exercises/concept/stack-underflow/mix.exs @@ -5,7 +5,6 @@ defmodule RPNCalculator.MixProject do [ app: :stack_underflow, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/take-a-number-deluxe/.meta/config.json b/exercises/concept/take-a-number-deluxe/.meta/config.json index 05e29d69a0..9815d61473 100644 --- a/exercises/concept/take-a-number-deluxe/.meta/config.json +++ b/exercises/concept/take-a-number-deluxe/.meta/config.json @@ -20,7 +20,6 @@ "lib/take_a_number_deluxe/queue.ex" ] }, - "language_versions": ">=1.10", "icon": "take-a-number", "blurb": "Learn about GenServers by writing an embedded system for a Take-A-Number machine." } diff --git a/exercises/concept/take-a-number-deluxe/mix.exs b/exercises/concept/take-a-number-deluxe/mix.exs index af96157091..708a981cf4 100644 --- a/exercises/concept/take-a-number-deluxe/mix.exs +++ b/exercises/concept/take-a-number-deluxe/mix.exs @@ -5,7 +5,6 @@ defmodule TakeANumber.MixProject do [ app: :take_a_number_deluxe, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/take-a-number/.meta/config.json b/exercises/concept/take-a-number/.meta/config.json index 9e2e943030..24f71695db 100644 --- a/exercises/concept/take-a-number/.meta/config.json +++ b/exercises/concept/take-a-number/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about processes and process identifiers by writing an embedded system for a Take-A-Number machine." } diff --git a/exercises/concept/take-a-number/mix.exs b/exercises/concept/take-a-number/mix.exs index 36ac6a67da..e3186cf0a8 100644 --- a/exercises/concept/take-a-number/mix.exs +++ b/exercises/concept/take-a-number/mix.exs @@ -5,7 +5,6 @@ defmodule TakeANumber.MixProject do [ app: :take_a_number, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/top-secret/.meta/config.json b/exercises/concept/top-secret/.meta/config.json index fbefcdb2fc..c77dc3fbc3 100644 --- a/exercises/concept/top-secret/.meta/config.json +++ b/exercises/concept/top-secret/.meta/config.json @@ -14,6 +14,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about the Abstract Syntax Tree (AST) by helping decode secret messages from Agent Ex." } diff --git a/exercises/concept/top-secret/mix.exs b/exercises/concept/top-secret/mix.exs index e670bb8d6d..64c31d5cf0 100644 --- a/exercises/concept/top-secret/mix.exs +++ b/exercises/concept/top-secret/mix.exs @@ -5,7 +5,6 @@ defmodule TopSecret.MixProject do [ app: :top_secret, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/concept/wine-cellar/.meta/config.json b/exercises/concept/wine-cellar/.meta/config.json index ec011dac1b..ed2b313114 100644 --- a/exercises/concept/wine-cellar/.meta/config.json +++ b/exercises/concept/wine-cellar/.meta/config.json @@ -16,6 +16,5 @@ ".meta/exemplar.ex" ] }, - "language_versions": ">=1.10", "blurb": "Learn about keyword lists by providing wine suggestions to the customers in your restaurant." } diff --git a/exercises/concept/wine-cellar/mix.exs b/exercises/concept/wine-cellar/mix.exs index 043ecc93f9..8899a55f56 100644 --- a/exercises/concept/wine-cellar/mix.exs +++ b/exercises/concept/wine-cellar/mix.exs @@ -5,7 +5,6 @@ defmodule WineCellar.MixProject do [ app: :wine_cellar, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/practice/armstrong-numbers/.meta/example.ex b/exercises/practice/armstrong-numbers/.meta/example.ex index 16c413774a..ed6958eac9 100644 --- a/exercises/practice/armstrong-numbers/.meta/example.ex +++ b/exercises/practice/armstrong-numbers/.meta/example.ex @@ -9,19 +9,7 @@ defmodule ArmstrongNumber do exponent = length(digits) Enum.reduce(digits, 0, fn number, acc -> - pow(number, exponent) + acc + Integer.pow(number, exponent) + acc end) == number end - - defp pow(number, exponent) do - # in Elixir 1.12 and above, could be: - # Integer.pow(number, exponent) - do_pow(number, exponent) - end - - defp do_pow(number, 1), do: number - - defp do_pow(number, exponent) when is_integer(exponent) and exponent > 1 do - number * pow(number, exponent - 1) - end end diff --git a/exercises/practice/bottle-song/mix.exs b/exercises/practice/bottle-song/mix.exs index b6cac602f8..7b8594f560 100644 --- a/exercises/practice/bottle-song/mix.exs +++ b/exercises/practice/bottle-song/mix.exs @@ -5,7 +5,7 @@ defmodule BottleSong.MixProject do [ app: :bottle_song, version: "1.0.0", - elixir: "~> 1.10", + # elixir: "~> 1.8", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/practice/game-of-life/mix.exs b/exercises/practice/game-of-life/mix.exs index 91b15ac62a..6d152fbd17 100644 --- a/exercises/practice/game-of-life/mix.exs +++ b/exercises/practice/game-of-life/mix.exs @@ -5,7 +5,6 @@ defmodule GameOfLife.MixProject do [ app: :game_of_life, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/practice/ledger/mix.exs b/exercises/practice/ledger/mix.exs index ddbc1da0a9..45c1c66106 100644 --- a/exercises/practice/ledger/mix.exs +++ b/exercises/practice/ledger/mix.exs @@ -5,7 +5,6 @@ defmodule Ledger.MixProject do [ app: :ledger, version: "0.1.0", - # elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ] diff --git a/exercises/practice/resistor-color-duo/.docs/instructions.md b/exercises/practice/resistor-color-duo/.docs/instructions.md index bdcd549b1a..4ae694da02 100644 --- a/exercises/practice/resistor-color-duo/.docs/instructions.md +++ b/exercises/practice/resistor-color-duo/.docs/instructions.md @@ -17,17 +17,17 @@ The program will take color names as input and output a two digit number, even i The band colors are encoded as follows: -- Black: 0 -- Brown: 1 -- Red: 2 -- Orange: 3 -- Yellow: 4 -- Green: 5 -- Blue: 6 -- Violet: 7 -- Grey: 8 -- White: 9 +- black: 0 +- brown: 1 +- red: 2 +- orange: 3 +- yellow: 4 +- green: 5 +- blue: 6 +- violet: 7 +- grey: 8 +- white: 9 From the example above: -brown-green should return 15 +brown-green should return 15, and brown-green-violet should return 15 too, ignoring the third color. diff --git a/exercises/practice/resistor-color-trio/.docs/instructions.md b/exercises/practice/resistor-color-trio/.docs/instructions.md index 59d22783b9..1ac5cf5e9f 100644 --- a/exercises/practice/resistor-color-trio/.docs/instructions.md +++ b/exercises/practice/resistor-color-trio/.docs/instructions.md @@ -12,16 +12,16 @@ For this exercise, you need to know only three things about them: The program will take 3 colors as input, and outputs the correct value, in ohms. The color bands are encoded as follows: -- Black: 0 -- Brown: 1 -- Red: 2 -- Orange: 3 -- Yellow: 4 -- Green: 5 -- Blue: 6 -- Violet: 7 -- Grey: 8 -- White: 9 +- black: 0 +- brown: 1 +- red: 2 +- orange: 3 +- yellow: 4 +- green: 5 +- blue: 6 +- violet: 7 +- grey: 8 +- white: 9 In Resistor Color Duo you decoded the first two colors. For instance: orange-orange got the main value `33`. diff --git a/exercises/practice/resistor-color/.docs/instructions.md b/exercises/practice/resistor-color/.docs/instructions.md index 646c14398f..0125e718b4 100644 --- a/exercises/practice/resistor-color/.docs/instructions.md +++ b/exercises/practice/resistor-color/.docs/instructions.md @@ -15,16 +15,16 @@ In this exercise you are going to create a helpful program so that you don't hav These colors are encoded as follows: -- Black: 0 -- Brown: 1 -- Red: 2 -- Orange: 3 -- Yellow: 4 -- Green: 5 -- Blue: 6 -- Violet: 7 -- Grey: 8 -- White: 9 +- black: 0 +- brown: 1 +- red: 2 +- orange: 3 +- yellow: 4 +- green: 5 +- blue: 6 +- violet: 7 +- grey: 8 +- white: 9 The goal of this exercise is to create a way: diff --git a/exercises/practice/word-count/.meta/example.ex b/exercises/practice/word-count/.meta/example.ex index 277a373548..5762ebb374 100644 --- a/exercises/practice/word-count/.meta/example.ex +++ b/exercises/practice/word-count/.meta/example.ex @@ -9,7 +9,7 @@ defmodule WordCount do sentence |> normalize() |> split - |> frequencies() + |> Enum.frequencies() end defp normalize(string) do @@ -23,12 +23,4 @@ defmodule WordCount do |> Regex.scan(string) |> List.flatten() end - - defp frequencies(strings) do - # Enum.frequencies is only available from Elixir 1.10 - strings - |> Enum.reduce(%{}, fn word, count -> - Map.update(count, word, 1, &(&1 + 1)) - end) - end end