trackler 2.2.1.54 → 2.2.1.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/dominoes/description.md +3 -3
- data/problem-specifications/exercises/two-fer/description.md +0 -28
- data/tracks/c/config.json +12 -0
- data/tracks/c/exercises/queen-attack/README.md +65 -0
- data/tracks/c/exercises/queen-attack/makefile +15 -0
- data/tracks/c/exercises/queen-attack/src/example.c +25 -0
- data/tracks/c/exercises/queen-attack/src/queen_attack.h +19 -0
- data/tracks/c/exercises/queen-attack/test/test_queen_attack.c +190 -0
- data/tracks/c/exercises/queen-attack/test/vendor/unity.c +1300 -0
- data/tracks/c/exercises/queen-attack/test/vendor/unity.h +274 -0
- data/tracks/c/exercises/queen-attack/test/vendor/unity_internals.h +701 -0
- data/tracks/common-lisp/exercises/acronym/README.md +1 -1
- data/tracks/delphi/exercises/two-fer/README.md +0 -28
- data/tracks/ecmascript/config.json +41 -0
- data/tracks/ecmascript/exercises/accumulate/package.json +5 -3
- data/tracks/ecmascript/exercises/acronym/package.json +5 -3
- data/tracks/ecmascript/exercises/all-your-base/package.json +5 -3
- data/tracks/ecmascript/exercises/allergies/package.json +5 -3
- data/tracks/ecmascript/exercises/alphametics/package.json +5 -3
- data/tracks/ecmascript/exercises/anagram/package.json +5 -3
- data/tracks/ecmascript/exercises/atbash-cipher/package.json +5 -3
- data/tracks/ecmascript/exercises/beer-song/package.json +5 -3
- data/tracks/ecmascript/exercises/binary-search-tree/package.json +5 -3
- data/tracks/ecmascript/exercises/binary-search/package.json +5 -3
- data/tracks/ecmascript/exercises/binary/package.json +5 -3
- data/tracks/ecmascript/exercises/bob/package.json +5 -3
- data/tracks/ecmascript/exercises/bowling/package.json +2 -2
- data/tracks/ecmascript/exercises/bracket-push/package.json +5 -3
- data/tracks/ecmascript/exercises/change/README.md +44 -0
- data/tracks/ecmascript/exercises/change/change.spec.js +80 -0
- data/tracks/ecmascript/exercises/change/example.js +120 -0
- data/tracks/ecmascript/exercises/change/package.json +69 -0
- data/tracks/ecmascript/exercises/circular-buffer/package.json +5 -3
- data/tracks/ecmascript/exercises/clock/package.json +5 -3
- data/tracks/ecmascript/exercises/collatz-conjecture/package.json +6 -4
- data/tracks/ecmascript/exercises/connect/package.json +5 -3
- data/tracks/ecmascript/exercises/crypto-square/package.json +5 -3
- data/tracks/ecmascript/exercises/custom-set/package.json +5 -3
- data/tracks/ecmascript/exercises/diamond/package.json +5 -3
- data/tracks/ecmascript/exercises/difference-of-squares/package.json +5 -3
- data/tracks/ecmascript/exercises/diffie-hellman/package.json +5 -3
- data/tracks/ecmascript/exercises/etl/package.json +5 -3
- data/tracks/ecmascript/exercises/flatten-array/package.json +5 -3
- data/tracks/ecmascript/exercises/food-chain/package.json +5 -3
- data/tracks/ecmascript/exercises/gigasecond/package.json +5 -3
- data/tracks/ecmascript/exercises/grade-school/package.json +5 -3
- data/tracks/ecmascript/exercises/grains/package.json +5 -3
- data/tracks/ecmascript/exercises/hamming/package.json +5 -3
- data/tracks/ecmascript/exercises/hello-world/package.json +5 -3
- data/tracks/ecmascript/exercises/hexadecimal/package.json +5 -3
- data/tracks/ecmascript/exercises/isbn-verifier/README.md +62 -0
- data/tracks/ecmascript/exercises/isbn-verifier/example.js +17 -0
- data/tracks/ecmascript/exercises/isbn-verifier/isbn-verifier.spec.js +81 -0
- data/tracks/ecmascript/exercises/isbn-verifier/package.json +71 -0
- data/tracks/ecmascript/exercises/isogram/package.json +5 -3
- data/tracks/ecmascript/exercises/kindergarten-garden/package.json +5 -3
- data/tracks/ecmascript/exercises/largest-series-product/package.json +5 -3
- data/tracks/ecmascript/exercises/leap/package.json +5 -3
- data/tracks/ecmascript/exercises/linked-list/package.json +5 -3
- data/tracks/ecmascript/exercises/list-ops/package.json +5 -3
- data/tracks/ecmascript/exercises/luhn/package.json +5 -3
- data/tracks/ecmascript/exercises/matrix/package.json +5 -3
- data/tracks/ecmascript/exercises/meetup/package.json +5 -3
- data/tracks/ecmascript/exercises/minesweeper/package.json +5 -3
- data/tracks/ecmascript/exercises/nth-prime/package.json +5 -3
- data/tracks/ecmascript/exercises/ocr-numbers/package.json +5 -3
- data/tracks/ecmascript/exercises/octal/package.json +5 -3
- data/tracks/ecmascript/exercises/palindrome-products/package.json +5 -3
- data/tracks/ecmascript/exercises/pangram/package.json +5 -3
- data/tracks/ecmascript/exercises/pascals-triangle/package.json +5 -3
- data/tracks/ecmascript/exercises/perfect-numbers/package.json +5 -3
- data/tracks/ecmascript/exercises/phone-number/package.json +5 -3
- data/tracks/ecmascript/exercises/pig-latin/package.json +5 -3
- data/tracks/ecmascript/exercises/prime-factors/package.json +5 -3
- data/tracks/ecmascript/exercises/proverb/package.json +5 -3
- data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +5 -3
- data/tracks/ecmascript/exercises/queen-attack/package.json +5 -3
- data/tracks/ecmascript/exercises/raindrops/package.json +5 -3
- data/tracks/ecmascript/exercises/rna-transcription/package.json +5 -3
- data/tracks/ecmascript/exercises/robot-name/package.json +5 -3
- data/tracks/ecmascript/exercises/robot-simulator/package.json +5 -3
- data/tracks/ecmascript/exercises/roman-numerals/package.json +5 -3
- data/tracks/ecmascript/exercises/run-length-encoding/package.json +5 -3
- data/tracks/ecmascript/exercises/saddle-points/package.json +5 -3
- data/tracks/ecmascript/exercises/say/package.json +5 -3
- data/tracks/ecmascript/exercises/scrabble-score/package.json +5 -3
- data/tracks/ecmascript/exercises/secret-handshake/package.json +5 -3
- data/tracks/ecmascript/exercises/series/package.json +5 -3
- data/tracks/ecmascript/exercises/sieve/package.json +5 -3
- data/tracks/ecmascript/exercises/simple-cipher/package.json +5 -3
- data/tracks/ecmascript/exercises/simple-linked-list/package.json +5 -3
- data/tracks/ecmascript/exercises/space-age/package.json +5 -3
- data/tracks/ecmascript/exercises/strain/package.json +5 -3
- data/tracks/ecmascript/exercises/sublist/package.json +5 -3
- data/tracks/ecmascript/exercises/sum-of-multiples/package.json +5 -3
- data/tracks/ecmascript/exercises/transpose/README.md +94 -0
- data/tracks/ecmascript/exercises/transpose/example.js +12 -0
- data/tracks/ecmascript/exercises/transpose/package.json +71 -0
- data/tracks/ecmascript/exercises/transpose/transpose.spec.js +67 -0
- data/tracks/ecmascript/exercises/triangle/package.json +5 -3
- data/tracks/ecmascript/exercises/trinary/package.json +5 -3
- data/tracks/ecmascript/exercises/twelve-days/package.json +5 -3
- data/tracks/ecmascript/exercises/two-bucket/package.json +5 -3
- data/tracks/ecmascript/exercises/two-fer/package.json +5 -3
- data/tracks/ecmascript/exercises/word-count/package.json +5 -3
- data/tracks/ecmascript/exercises/word-search/package.json +5 -3
- data/tracks/ecmascript/exercises/wordy/package.json +5 -3
- data/tracks/ecmascript/package-lock.json +6219 -0
- data/tracks/ecmascript/package.json +5 -3
- data/tracks/erlang/exercises/collatz-conjecture/src/collatz_conjecture.erl +3 -4
- data/tracks/erlang/exercises/collatz-conjecture/src/example.erl +3 -3
- data/tracks/erlang/exercises/collatz-conjecture/test/collatz_conjecture_tests.erl +13 -9
- data/tracks/erlang/exercises/hello-world/src/hello_world.erl +2 -2
- data/tracks/erlang/exercises/leap/src/example.erl +1 -1
- data/tracks/erlang/exercises/leap/src/leap.erl +3 -3
- data/tracks/erlang/exercises/leap/test/leap_tests.erl +9 -9
- data/tracks/erlang/testgen/src/testgen.erl +16 -13
- data/tracks/erlang/testgen/src/tgen.erl +65 -38
- data/tracks/erlang/testgen/src/tgen_collatz-conjecture.erl +38 -0
- data/tracks/erlang/testgen/src/tgen_hello-world.erl +11 -19
- data/tracks/erlang/testgen/src/tgen_leap.erl +31 -0
- data/tracks/erlang/testgen/src/tgs.erl +80 -0
- data/tracks/fsharp/exercises/alphametics/AlphameticsTest.fs +78 -23
- data/tracks/fsharp/exercises/anagram/AnagramTest.fs +66 -34
- data/tracks/fsharp/exercises/connect/ConnectTest.fs +81 -68
- data/tracks/fsharp/exercises/connect/Example.fs +9 -5
- data/tracks/fsharp/exercises/food-chain/Example.fs +5 -9
- data/tracks/fsharp/exercises/food-chain/FoodChain.fs +2 -2
- data/tracks/fsharp/exercises/food-chain/FoodChainTest.fs +143 -75
- data/tracks/fsharp/exercises/hamming/Example.fs +8 -4
- data/tracks/fsharp/exercises/hamming/Hamming.fs +1 -1
- data/tracks/fsharp/exercises/hamming/HammingTest.fs +53 -13
- data/tracks/fsharp/exercises/house/Example.fs +5 -6
- data/tracks/fsharp/exercises/house/House.fs +3 -1
- data/tracks/fsharp/exercises/house/HouseTest.fs +272 -96
- data/tracks/fsharp/exercises/meetup/Example.fs +1 -1
- data/tracks/fsharp/exercises/meetup/Meetup.fs +1 -1
- data/tracks/fsharp/exercises/meetup/MeetupTest.fs +384 -73
- data/tracks/fsharp/exercises/ocr-numbers/Example.fs +43 -35
- data/tracks/fsharp/exercises/ocr-numbers/OcrNumbersTest.fs +160 -125
- data/tracks/fsharp/exercises/two-fer/Example.fs +4 -2
- data/tracks/fsharp/exercises/two-fer/TwoFer.fs +1 -1
- data/tracks/fsharp/exercises/two-fer/TwoFerTest.fs +7 -4
- data/tracks/fsharp/generators/Common.fs +6 -2
- data/tracks/fsharp/generators/Exercise.fs +14 -13
- data/tracks/fsharp/generators/Generators.fs +145 -2
- data/tracks/fsharp/generators/Options.fs +4 -6
- data/tracks/fsharp/generators/Output.fs +2 -2
- data/tracks/fsharp/generators/Program.fs +4 -3
- data/tracks/java/exercises/saddle-points/README.md +1 -1
- data/tracks/java/exercises/two-fer/README.md +0 -28
- data/tracks/javascript/exercises/beer-song/example.js +18 -14
- data/tracks/kotlin/exercises/saddle-points/README.md +1 -1
- data/tracks/kotlin/exercises/two-fer/README.md +0 -28
- data/tracks/lua/config.json +12 -0
- data/tracks/lua/exercises/collatz-conjecture/README.md +43 -0
- data/tracks/lua/exercises/collatz-conjecture/collatz-conjecture_spec.lua +33 -0
- data/tracks/lua/exercises/collatz-conjecture/example.lua +16 -0
- data/tracks/python/config.json +4 -1
- data/tracks/python/exercises/binary-search/binary_search_test.py +2 -0
- data/tracks/python/exercises/change/change_test.py +2 -0
- data/tracks/python/exercises/circular-buffer/circular_buffer_test.py +56 -50
- data/tracks/python/exercises/forth/example.py +3 -1
- data/tracks/python/exercises/forth/forth_test.py +43 -26
- data/tracks/python/exercises/nth-prime/nth_prime.py +1 -1
- data/tracks/python/exercises/rna-transcription/README.md +5 -0
- data/tracks/python/exercises/rna-transcription/example.py +1 -1
- data/tracks/python/exercises/rna-transcription/rna_transcription_test.py +7 -4
- data/tracks/python/exercises/robot-simulator/robot_simulator_test.py +9 -7
- data/tracks/python/exercises/saddle-points/saddle_points_test.py +15 -5
- data/tracks/python/exercises/simple-cipher/simple_cipher.py +7 -1
- data/tracks/python/exercises/word-count/example.py +6 -4
- data/tracks/python/exercises/word-count/word_count_test.py +49 -22
- data/tracks/python/exercises/word-search/word_search_test.py +104 -12
- data/tracks/rust/.travis.yml +2 -0
- data/tracks/rust/README.md +5 -0
- data/tracks/rust/_test/check-exercises.sh +0 -6
- data/tracks/rust/_test/ensure-lib-src-rs-exist.sh +19 -0
- data/tracks/rust/_test/ensure-stubs-compile.sh +26 -0
- data/tracks/rust/config.json +12 -0
- data/tracks/rust/config/exercise-readme-insert.md +3 -2
- data/tracks/rust/docs/ABOUT.md +2 -2
- data/tracks/rust/docs/LEARNING.md +1 -1
- data/tracks/rust/docs/RESOURCES.md +1 -1
- data/tracks/rust/docs/TESTS.md +2 -2
- data/tracks/rust/exercises/accumulate/README.md +3 -2
- data/tracks/rust/exercises/acronym/README.md +3 -2
- data/tracks/rust/exercises/all-your-base/README.md +3 -2
- data/tracks/rust/exercises/allergies/README.md +3 -2
- data/tracks/rust/exercises/alphametics/README.md +3 -2
- data/tracks/rust/exercises/anagram/README.md +3 -2
- data/tracks/rust/exercises/atbash-cipher/README.md +3 -2
- data/tracks/rust/exercises/beer-song/README.md +3 -2
- data/tracks/rust/exercises/beer-song/src/lib.rs +2 -2
- data/tracks/rust/exercises/binary-search/README.md +3 -2
- data/tracks/rust/exercises/bob/README.md +3 -2
- data/tracks/rust/exercises/bob/src/lib.rs +1 -1
- data/tracks/rust/exercises/bowling/README.md +3 -2
- data/tracks/rust/exercises/bracket-push/HINTS.md +1 -1
- data/tracks/rust/exercises/bracket-push/README.md +4 -3
- data/tracks/rust/exercises/circular-buffer/README.md +3 -2
- data/tracks/rust/exercises/clock/README.md +3 -2
- data/tracks/rust/exercises/collatz-conjecture/README.md +3 -2
- data/tracks/rust/exercises/collatz-conjecture/src/lib.rs +1 -1
- data/tracks/rust/exercises/crypto-square/README.md +3 -2
- data/tracks/rust/exercises/custom-set/README.md +3 -2
- data/tracks/rust/exercises/decimal/.meta/ALLOWED_TO_NOT_COMPILE +2 -0
- data/tracks/rust/exercises/decimal/README.md +3 -2
- data/tracks/rust/exercises/difference-of-squares/README.md +3 -2
- data/tracks/rust/exercises/difference-of-squares/src/lib.rs +3 -3
- data/tracks/rust/exercises/dominoes/README.md +3 -2
- data/tracks/rust/exercises/etl/README.md +3 -2
- data/tracks/rust/exercises/forth/README.md +3 -2
- data/tracks/rust/exercises/forth/src/lib.rs +3 -0
- data/tracks/rust/exercises/gigasecond/README.md +3 -2
- data/tracks/rust/exercises/grade-school/README.md +3 -2
- data/tracks/rust/exercises/grains/README.md +3 -2
- data/tracks/rust/exercises/hamming/README.md +3 -2
- data/tracks/rust/exercises/hello-world/GETTING_STARTED.md +1 -1
- data/tracks/rust/exercises/hello-world/README.md +3 -2
- data/tracks/rust/exercises/hexadecimal/README.md +3 -2
- data/tracks/rust/exercises/isogram/.gitignore +8 -0
- data/tracks/rust/exercises/isogram/Cargo.toml +3 -0
- data/tracks/rust/exercises/isogram/README.md +52 -0
- data/tracks/rust/exercises/isogram/example.rs +12 -0
- data/tracks/rust/exercises/isogram/src/lib.rs +0 -0
- data/tracks/rust/exercises/isogram/tests/isogram.rs +72 -0
- data/tracks/rust/exercises/largest-series-product/README.md +3 -2
- data/tracks/rust/exercises/leap/README.md +3 -2
- data/tracks/rust/exercises/leap/src/lib.rs +1 -1
- data/tracks/rust/exercises/luhn-from/README.md +3 -2
- data/tracks/rust/exercises/luhn-trait/.meta/description.md +2 -2
- data/tracks/rust/exercises/luhn-trait/README.md +5 -4
- data/tracks/rust/exercises/luhn/README.md +3 -2
- data/tracks/rust/exercises/minesweeper/README.md +3 -2
- data/tracks/rust/exercises/nth-prime/README.md +3 -2
- data/tracks/rust/exercises/nucleotide-codons/README.md +3 -2
- data/tracks/rust/exercises/nucleotide-count/README.md +3 -2
- data/tracks/rust/exercises/ocr-numbers/README.md +3 -2
- data/tracks/rust/exercises/pangram/README.md +3 -2
- data/tracks/rust/exercises/parallel-letter-frequency/HINTS.md +1 -1
- data/tracks/rust/exercises/parallel-letter-frequency/README.md +4 -3
- data/tracks/rust/exercises/pascals-triangle/README.md +3 -2
- data/tracks/rust/exercises/perfect-numbers/README.md +3 -2
- data/tracks/rust/exercises/phone-number/README.md +3 -2
- data/tracks/rust/exercises/pig-latin/README.md +3 -2
- data/tracks/rust/exercises/poker/README.md +3 -2
- data/tracks/rust/exercises/prime-factors/README.md +3 -2
- data/tracks/rust/exercises/protein-translation/README.md +3 -2
- data/tracks/rust/exercises/proverb/README.md +3 -2
- data/tracks/rust/exercises/proverb/src/lib.rs +1 -1
- data/tracks/rust/exercises/pythagorean-triplet/README.md +3 -2
- data/tracks/rust/exercises/queen-attack/README.md +3 -2
- data/tracks/rust/exercises/raindrops/README.md +3 -2
- data/tracks/rust/exercises/raindrops/src/lib.rs +1 -1
- data/tracks/rust/exercises/react/README.md +3 -2
- data/tracks/rust/exercises/rectangles/README.md +3 -2
- data/tracks/rust/exercises/rna-transcription/README.md +3 -2
- data/tracks/rust/exercises/robot-name/README.md +3 -2
- data/tracks/rust/exercises/robot-simulator/README.md +3 -2
- data/tracks/rust/exercises/roman-numerals/README.md +3 -2
- data/tracks/rust/exercises/rotational-cipher/README.md +3 -2
- data/tracks/rust/exercises/run-length-encoding/README.md +3 -2
- data/tracks/rust/exercises/say/README.md +3 -2
- data/tracks/rust/exercises/scrabble-score/README.md +3 -2
- data/tracks/rust/exercises/sieve/README.md +3 -2
- data/tracks/rust/exercises/space-age/README.md +3 -2
- data/tracks/rust/exercises/sublist/README.md +3 -2
- data/tracks/rust/exercises/sum-of-multiples/README.md +3 -2
- data/tracks/rust/exercises/sum-of-multiples/src/lib.rs +1 -1
- data/tracks/rust/exercises/tournament/README.md +3 -2
- data/tracks/rust/exercises/triangle/HINTS.md +2 -2
- data/tracks/rust/exercises/triangle/README.md +5 -4
- data/tracks/rust/exercises/variable-length-quantity/README.md +3 -2
- data/tracks/rust/exercises/word-count/README.md +3 -2
- data/tracks/rust/exercises/wordy/README.md +3 -2
- metadata +38 -3
- data/tracks/ecmascript/yarn.lock +0 -3144
@@ -86,7 +86,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
86
86
|
also remove the ignore flag from all the tests to get them to run all at once
|
87
87
|
if you wish.
|
88
88
|
|
89
|
-
Make sure to read the [
|
89
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
90
90
|
haven't already, it will help you with organizing your files.
|
91
91
|
|
92
92
|
## Feedback, Issues, Pull Requests
|
@@ -96,7 +96,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
96
96
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
97
97
|
|
98
98
|
[help-page]: http://exercism.io/languages/rust
|
99
|
-
[
|
99
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
100
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
100
101
|
|
101
102
|
## Source
|
102
103
|
|
@@ -26,7 +26,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
26
26
|
also remove the ignore flag from all the tests to get them to run all at once
|
27
27
|
if you wish.
|
28
28
|
|
29
|
-
Make sure to read the [
|
29
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
30
30
|
haven't already, it will help you with organizing your files.
|
31
31
|
|
32
32
|
## Feedback, Issues, Pull Requests
|
@@ -36,7 +36,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
36
36
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
37
37
|
|
38
38
|
[help-page]: http://exercism.io/languages/rust
|
39
|
-
[
|
39
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
40
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
40
41
|
|
41
42
|
|
42
43
|
## Submitting Incomplete Solutions
|
@@ -39,7 +39,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
39
39
|
also remove the ignore flag from all the tests to get them to run all at once
|
40
40
|
if you wish.
|
41
41
|
|
42
|
-
Make sure to read the [
|
42
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
43
43
|
haven't already, it will help you with organizing your files.
|
44
44
|
|
45
45
|
## Feedback, Issues, Pull Requests
|
@@ -49,7 +49,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
49
49
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
50
50
|
|
51
51
|
[help-page]: http://exercism.io/languages/rust
|
52
|
-
[
|
52
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
53
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
53
54
|
|
54
55
|
## Source
|
55
56
|
|
@@ -31,7 +31,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
31
31
|
also remove the ignore flag from all the tests to get them to run all at once
|
32
32
|
if you wish.
|
33
33
|
|
34
|
-
Make sure to read the [
|
34
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
35
35
|
haven't already, it will help you with organizing your files.
|
36
36
|
|
37
37
|
## Feedback, Issues, Pull Requests
|
@@ -41,7 +41,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
41
41
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
42
42
|
|
43
43
|
[help-page]: http://exercism.io/languages/rust
|
44
|
-
[
|
44
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
45
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
45
46
|
|
46
47
|
## Source
|
47
48
|
|
@@ -33,7 +33,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
33
33
|
also remove the ignore flag from all the tests to get them to run all at once
|
34
34
|
if you wish.
|
35
35
|
|
36
|
-
Make sure to read the [
|
36
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
37
37
|
haven't already, it will help you with organizing your files.
|
38
38
|
|
39
39
|
## Feedback, Issues, Pull Requests
|
@@ -43,7 +43,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
43
43
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
44
44
|
|
45
45
|
[help-page]: http://exercism.io/languages/rust
|
46
|
-
[
|
46
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
47
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
47
48
|
|
48
49
|
|
49
50
|
## Submitting Incomplete Solutions
|
@@ -63,7 +63,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
63
63
|
also remove the ignore flag from all the tests to get them to run all at once
|
64
64
|
if you wish.
|
65
65
|
|
66
|
-
Make sure to read the [
|
66
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
67
67
|
haven't already, it will help you with organizing your files.
|
68
68
|
|
69
69
|
## Feedback, Issues, Pull Requests
|
@@ -73,7 +73,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
73
73
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
74
74
|
|
75
75
|
[help-page]: http://exercism.io/languages/rust
|
76
|
-
[
|
76
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
77
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
77
78
|
|
78
79
|
## Source
|
79
80
|
|
@@ -44,7 +44,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
44
44
|
also remove the ignore flag from all the tests to get them to run all at once
|
45
45
|
if you wish.
|
46
46
|
|
47
|
-
Make sure to read the [
|
47
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
48
48
|
haven't already, it will help you with organizing your files.
|
49
49
|
|
50
50
|
## Feedback, Issues, Pull Requests
|
@@ -54,7 +54,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
54
54
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
55
55
|
|
56
56
|
[help-page]: http://exercism.io/languages/rust
|
57
|
-
[
|
57
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
58
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
58
59
|
|
59
60
|
|
60
61
|
## Submitting Incomplete Solutions
|
@@ -13,11 +13,14 @@ pub enum Error {
|
|
13
13
|
|
14
14
|
impl Forth {
|
15
15
|
pub fn new() -> Forth {
|
16
|
+
unimplemented!()
|
16
17
|
}
|
17
18
|
|
18
19
|
pub fn stack(&self) -> Vec<Value> {
|
20
|
+
unimplemented!()
|
19
21
|
}
|
20
22
|
|
21
23
|
pub fn eval(&mut self, input: &str) -> ForthResult {
|
24
|
+
unimplemented!()
|
22
25
|
}
|
23
26
|
}
|
@@ -23,7 +23,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
23
23
|
also remove the ignore flag from all the tests to get them to run all at once
|
24
24
|
if you wish.
|
25
25
|
|
26
|
-
Make sure to read the [
|
26
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
27
27
|
haven't already, it will help you with organizing your files.
|
28
28
|
|
29
29
|
## Feedback, Issues, Pull Requests
|
@@ -33,7 +33,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
33
33
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
34
34
|
|
35
35
|
[help-page]: http://exercism.io/languages/rust
|
36
|
-
[
|
36
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
37
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
37
38
|
|
38
39
|
## Source
|
39
40
|
|
@@ -54,7 +54,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
54
54
|
also remove the ignore flag from all the tests to get them to run all at once
|
55
55
|
if you wish.
|
56
56
|
|
57
|
-
Make sure to read the [
|
57
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
58
58
|
haven't already, it will help you with organizing your files.
|
59
59
|
|
60
60
|
## Feedback, Issues, Pull Requests
|
@@ -64,7 +64,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
64
64
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
65
65
|
|
66
66
|
[help-page]: http://exercism.io/languages/rust
|
67
|
-
[
|
67
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
68
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
68
69
|
|
69
70
|
## Source
|
70
71
|
|
@@ -46,7 +46,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
46
46
|
also remove the ignore flag from all the tests to get them to run all at once
|
47
47
|
if you wish.
|
48
48
|
|
49
|
-
Make sure to read the [
|
49
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
50
50
|
haven't already, it will help you with organizing your files.
|
51
51
|
|
52
52
|
## Feedback, Issues, Pull Requests
|
@@ -56,7 +56,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
56
56
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
57
57
|
|
58
58
|
[help-page]: http://exercism.io/languages/rust
|
59
|
-
[
|
59
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
60
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
60
61
|
|
61
62
|
## Source
|
62
63
|
|
@@ -54,7 +54,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
54
54
|
also remove the ignore flag from all the tests to get them to run all at once
|
55
55
|
if you wish.
|
56
56
|
|
57
|
-
Make sure to read the [
|
57
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
58
58
|
haven't already, it will help you with organizing your files.
|
59
59
|
|
60
60
|
## Feedback, Issues, Pull Requests
|
@@ -64,7 +64,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
64
64
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
65
65
|
|
66
66
|
[help-page]: http://exercism.io/languages/rust
|
67
|
-
[
|
67
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
68
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
68
69
|
|
69
70
|
## Source
|
70
71
|
|
@@ -6,7 +6,7 @@ an exact match.
|
|
6
6
|
The following steps assume that you are in the same directory as the exercise.
|
7
7
|
|
8
8
|
You must have rust installed.
|
9
|
-
Follow the [
|
9
|
+
Follow the [Installation chapter in the Rust book](https://doc.rust-lang.org/book/second-edition/ch01-01-installation.html).
|
10
10
|
The [Rust language section](http://exercism.io/languages/rust)
|
11
11
|
section from exercism is also useful.
|
12
12
|
|
@@ -33,7 +33,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
33
33
|
also remove the ignore flag from all the tests to get them to run all at once
|
34
34
|
if you wish.
|
35
35
|
|
36
|
-
Make sure to read the [
|
36
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
37
37
|
haven't already, it will help you with organizing your files.
|
38
38
|
|
39
39
|
## Feedback, Issues, Pull Requests
|
@@ -43,7 +43,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
43
43
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
44
44
|
|
45
45
|
[help-page]: http://exercism.io/languages/rust
|
46
|
-
[
|
46
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
47
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
47
48
|
|
48
49
|
## Source
|
49
50
|
|
@@ -26,7 +26,7 @@ to pass again. The test file is located in the `tests` directory. You can
|
|
26
26
|
also remove the ignore flag from all the tests to get them to run all at once
|
27
27
|
if you wish.
|
28
28
|
|
29
|
-
Make sure to read the [
|
29
|
+
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
30
30
|
haven't already, it will help you with organizing your files.
|
31
31
|
|
32
32
|
## Feedback, Issues, Pull Requests
|
@@ -36,7 +36,8 @@ The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is th
|
|
36
36
|
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
37
37
|
|
38
38
|
[help-page]: http://exercism.io/languages/rust
|
39
|
-
[
|
39
|
+
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
40
|
+
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
40
41
|
|
41
42
|
## Source
|
42
43
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Generated by Cargo
|
2
|
+
# will have compiled files and executables
|
3
|
+
/target/
|
4
|
+
**/*.rs.bk
|
5
|
+
|
6
|
+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
7
|
+
# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
|
8
|
+
Cargo.lock
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Isogram
|
2
|
+
|
3
|
+
Determine if a word or phrase is an isogram.
|
4
|
+
|
5
|
+
An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times.
|
6
|
+
|
7
|
+
Examples of isograms:
|
8
|
+
|
9
|
+
- lumberjacks
|
10
|
+
- background
|
11
|
+
- downstream
|
12
|
+
- six-year-old
|
13
|
+
|
14
|
+
The word *isograms*, however, is not an isogram, because the s repeats.
|
15
|
+
|
16
|
+
## Rust Installation
|
17
|
+
|
18
|
+
Refer to the [exercism help page][help-page] for Rust installation and learning
|
19
|
+
resources.
|
20
|
+
|
21
|
+
## Writing the Code
|
22
|
+
|
23
|
+
Execute the tests with:
|
24
|
+
|
25
|
+
```bash
|
26
|
+
$ cargo test
|
27
|
+
```
|
28
|
+
|
29
|
+
All but the first test have been ignored. After you get the first test to
|
30
|
+
pass, remove the ignore flag (`#[ignore]`) from the next test and get the tests
|
31
|
+
to pass again. The test file is located in the `tests` directory. You can
|
32
|
+
also remove the ignore flag from all the tests to get them to run all at once
|
33
|
+
if you wish.
|
34
|
+
|
35
|
+
Make sure to read the [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
|
36
|
+
haven't already, it will help you with organizing your files.
|
37
|
+
|
38
|
+
## Feedback, Issues, Pull Requests
|
39
|
+
|
40
|
+
The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the [rust track team](https://github.com/orgs/exercism/teams/rust) are happy to help!
|
41
|
+
|
42
|
+
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
|
43
|
+
|
44
|
+
[help-page]: http://exercism.io/languages/rust
|
45
|
+
[crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
|
46
|
+
|
47
|
+
## Source
|
48
|
+
|
49
|
+
Wikipedia [https://en.wikipedia.org/wiki/Isogram](https://en.wikipedia.org/wiki/Isogram)
|
50
|
+
|
51
|
+
## Submitting Incomplete Solutions
|
52
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,12 @@
|
|
1
|
+
pub fn check(word: &str) -> bool {
|
2
|
+
|
3
|
+
// Filter all non-Alphabetic character out and collect them in a new String
|
4
|
+
let normalized_string: String = word.to_lowercase().chars().filter(|c| c.is_alphabetic()).collect();
|
5
|
+
|
6
|
+
/* Find the char element from back and front and compare the index.
|
7
|
+
If it is the same unique char the index will be the same.*/
|
8
|
+
let is_unique = |x: char, word: &str| word.find(x).unwrap() == word.rfind(x).unwrap();
|
9
|
+
|
10
|
+
// Length should be the same if it is a isogram
|
11
|
+
normalized_string.len() == normalized_string.chars().filter(|&x| is_unique(x, normalized_string.as_str())).count()
|
12
|
+
}
|
File without changes
|
@@ -0,0 +1,72 @@
|
|
1
|
+
extern crate isogram;
|
2
|
+
|
3
|
+
use isogram::check;
|
4
|
+
|
5
|
+
#[test]
|
6
|
+
fn empty_string() {
|
7
|
+
assert_eq!(check(""), true, "An empty string should be an isogram.")
|
8
|
+
}
|
9
|
+
|
10
|
+
#[test]
|
11
|
+
#[ignore]
|
12
|
+
fn only_lower_case_characters() {
|
13
|
+
assert_eq!(check("isogram"),
|
14
|
+
true,
|
15
|
+
"\"isogram\" should be an isogram.")
|
16
|
+
}
|
17
|
+
|
18
|
+
#[test]
|
19
|
+
#[ignore]
|
20
|
+
fn one_duplicated_character() {
|
21
|
+
assert_eq!(check("eleven"),
|
22
|
+
false,
|
23
|
+
"\"eleven\" has more than one \'e\', therefore it is no isogram.")
|
24
|
+
}
|
25
|
+
|
26
|
+
#[test]
|
27
|
+
#[ignore]
|
28
|
+
fn longest_reported_english_isogram() {
|
29
|
+
assert_eq!(check("subdermatoglyphic"),
|
30
|
+
true,
|
31
|
+
"\"subdermatoglyphic\" should be an isogram.")
|
32
|
+
}
|
33
|
+
|
34
|
+
#[test]
|
35
|
+
#[ignore]
|
36
|
+
fn one_duplicated_character_mixed_case() {
|
37
|
+
assert_eq!(check("Alphabet"),
|
38
|
+
false,
|
39
|
+
"\"Alphabet\" has more than one \'a\', therefore it is no isogram.")
|
40
|
+
}
|
41
|
+
|
42
|
+
#[test]
|
43
|
+
#[ignore]
|
44
|
+
fn hypothetical_isogramic_word_with_hyphen() {
|
45
|
+
assert_eq!(check("thumbscrew-japingly"),
|
46
|
+
true,
|
47
|
+
"\"thumbscrew-japingly\" should be an isogram.")
|
48
|
+
}
|
49
|
+
|
50
|
+
#[test]
|
51
|
+
#[ignore]
|
52
|
+
fn isogram_with_duplicated_hyphen() {
|
53
|
+
assert_eq!(check("six-year-old"),
|
54
|
+
true,
|
55
|
+
"\"six-year-old\" should be an isogram.")
|
56
|
+
}
|
57
|
+
|
58
|
+
#[test]
|
59
|
+
#[ignore]
|
60
|
+
fn made_up_name_that_is_an_isogram() {
|
61
|
+
assert_eq!(check("Emily Jung Schwartzkopf"),
|
62
|
+
true,
|
63
|
+
"\"Emily Jung Schwartzkopf\" should be an isogram.")
|
64
|
+
}
|
65
|
+
|
66
|
+
#[test]
|
67
|
+
#[ignore]
|
68
|
+
fn duplicated_character_in_the_middle() {
|
69
|
+
assert_eq!(check("accentor"),
|
70
|
+
false,
|
71
|
+
"\"accentor\" has more than one \'c\', therefore it is no isogram.")
|
72
|
+
}
|