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.
Files changed (280) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/dominoes/description.md +3 -3
  4. data/problem-specifications/exercises/two-fer/description.md +0 -28
  5. data/tracks/c/config.json +12 -0
  6. data/tracks/c/exercises/queen-attack/README.md +65 -0
  7. data/tracks/c/exercises/queen-attack/makefile +15 -0
  8. data/tracks/c/exercises/queen-attack/src/example.c +25 -0
  9. data/tracks/c/exercises/queen-attack/src/queen_attack.h +19 -0
  10. data/tracks/c/exercises/queen-attack/test/test_queen_attack.c +190 -0
  11. data/tracks/c/exercises/queen-attack/test/vendor/unity.c +1300 -0
  12. data/tracks/c/exercises/queen-attack/test/vendor/unity.h +274 -0
  13. data/tracks/c/exercises/queen-attack/test/vendor/unity_internals.h +701 -0
  14. data/tracks/common-lisp/exercises/acronym/README.md +1 -1
  15. data/tracks/delphi/exercises/two-fer/README.md +0 -28
  16. data/tracks/ecmascript/config.json +41 -0
  17. data/tracks/ecmascript/exercises/accumulate/package.json +5 -3
  18. data/tracks/ecmascript/exercises/acronym/package.json +5 -3
  19. data/tracks/ecmascript/exercises/all-your-base/package.json +5 -3
  20. data/tracks/ecmascript/exercises/allergies/package.json +5 -3
  21. data/tracks/ecmascript/exercises/alphametics/package.json +5 -3
  22. data/tracks/ecmascript/exercises/anagram/package.json +5 -3
  23. data/tracks/ecmascript/exercises/atbash-cipher/package.json +5 -3
  24. data/tracks/ecmascript/exercises/beer-song/package.json +5 -3
  25. data/tracks/ecmascript/exercises/binary-search-tree/package.json +5 -3
  26. data/tracks/ecmascript/exercises/binary-search/package.json +5 -3
  27. data/tracks/ecmascript/exercises/binary/package.json +5 -3
  28. data/tracks/ecmascript/exercises/bob/package.json +5 -3
  29. data/tracks/ecmascript/exercises/bowling/package.json +2 -2
  30. data/tracks/ecmascript/exercises/bracket-push/package.json +5 -3
  31. data/tracks/ecmascript/exercises/change/README.md +44 -0
  32. data/tracks/ecmascript/exercises/change/change.spec.js +80 -0
  33. data/tracks/ecmascript/exercises/change/example.js +120 -0
  34. data/tracks/ecmascript/exercises/change/package.json +69 -0
  35. data/tracks/ecmascript/exercises/circular-buffer/package.json +5 -3
  36. data/tracks/ecmascript/exercises/clock/package.json +5 -3
  37. data/tracks/ecmascript/exercises/collatz-conjecture/package.json +6 -4
  38. data/tracks/ecmascript/exercises/connect/package.json +5 -3
  39. data/tracks/ecmascript/exercises/crypto-square/package.json +5 -3
  40. data/tracks/ecmascript/exercises/custom-set/package.json +5 -3
  41. data/tracks/ecmascript/exercises/diamond/package.json +5 -3
  42. data/tracks/ecmascript/exercises/difference-of-squares/package.json +5 -3
  43. data/tracks/ecmascript/exercises/diffie-hellman/package.json +5 -3
  44. data/tracks/ecmascript/exercises/etl/package.json +5 -3
  45. data/tracks/ecmascript/exercises/flatten-array/package.json +5 -3
  46. data/tracks/ecmascript/exercises/food-chain/package.json +5 -3
  47. data/tracks/ecmascript/exercises/gigasecond/package.json +5 -3
  48. data/tracks/ecmascript/exercises/grade-school/package.json +5 -3
  49. data/tracks/ecmascript/exercises/grains/package.json +5 -3
  50. data/tracks/ecmascript/exercises/hamming/package.json +5 -3
  51. data/tracks/ecmascript/exercises/hello-world/package.json +5 -3
  52. data/tracks/ecmascript/exercises/hexadecimal/package.json +5 -3
  53. data/tracks/ecmascript/exercises/isbn-verifier/README.md +62 -0
  54. data/tracks/ecmascript/exercises/isbn-verifier/example.js +17 -0
  55. data/tracks/ecmascript/exercises/isbn-verifier/isbn-verifier.spec.js +81 -0
  56. data/tracks/ecmascript/exercises/isbn-verifier/package.json +71 -0
  57. data/tracks/ecmascript/exercises/isogram/package.json +5 -3
  58. data/tracks/ecmascript/exercises/kindergarten-garden/package.json +5 -3
  59. data/tracks/ecmascript/exercises/largest-series-product/package.json +5 -3
  60. data/tracks/ecmascript/exercises/leap/package.json +5 -3
  61. data/tracks/ecmascript/exercises/linked-list/package.json +5 -3
  62. data/tracks/ecmascript/exercises/list-ops/package.json +5 -3
  63. data/tracks/ecmascript/exercises/luhn/package.json +5 -3
  64. data/tracks/ecmascript/exercises/matrix/package.json +5 -3
  65. data/tracks/ecmascript/exercises/meetup/package.json +5 -3
  66. data/tracks/ecmascript/exercises/minesweeper/package.json +5 -3
  67. data/tracks/ecmascript/exercises/nth-prime/package.json +5 -3
  68. data/tracks/ecmascript/exercises/ocr-numbers/package.json +5 -3
  69. data/tracks/ecmascript/exercises/octal/package.json +5 -3
  70. data/tracks/ecmascript/exercises/palindrome-products/package.json +5 -3
  71. data/tracks/ecmascript/exercises/pangram/package.json +5 -3
  72. data/tracks/ecmascript/exercises/pascals-triangle/package.json +5 -3
  73. data/tracks/ecmascript/exercises/perfect-numbers/package.json +5 -3
  74. data/tracks/ecmascript/exercises/phone-number/package.json +5 -3
  75. data/tracks/ecmascript/exercises/pig-latin/package.json +5 -3
  76. data/tracks/ecmascript/exercises/prime-factors/package.json +5 -3
  77. data/tracks/ecmascript/exercises/proverb/package.json +5 -3
  78. data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +5 -3
  79. data/tracks/ecmascript/exercises/queen-attack/package.json +5 -3
  80. data/tracks/ecmascript/exercises/raindrops/package.json +5 -3
  81. data/tracks/ecmascript/exercises/rna-transcription/package.json +5 -3
  82. data/tracks/ecmascript/exercises/robot-name/package.json +5 -3
  83. data/tracks/ecmascript/exercises/robot-simulator/package.json +5 -3
  84. data/tracks/ecmascript/exercises/roman-numerals/package.json +5 -3
  85. data/tracks/ecmascript/exercises/run-length-encoding/package.json +5 -3
  86. data/tracks/ecmascript/exercises/saddle-points/package.json +5 -3
  87. data/tracks/ecmascript/exercises/say/package.json +5 -3
  88. data/tracks/ecmascript/exercises/scrabble-score/package.json +5 -3
  89. data/tracks/ecmascript/exercises/secret-handshake/package.json +5 -3
  90. data/tracks/ecmascript/exercises/series/package.json +5 -3
  91. data/tracks/ecmascript/exercises/sieve/package.json +5 -3
  92. data/tracks/ecmascript/exercises/simple-cipher/package.json +5 -3
  93. data/tracks/ecmascript/exercises/simple-linked-list/package.json +5 -3
  94. data/tracks/ecmascript/exercises/space-age/package.json +5 -3
  95. data/tracks/ecmascript/exercises/strain/package.json +5 -3
  96. data/tracks/ecmascript/exercises/sublist/package.json +5 -3
  97. data/tracks/ecmascript/exercises/sum-of-multiples/package.json +5 -3
  98. data/tracks/ecmascript/exercises/transpose/README.md +94 -0
  99. data/tracks/ecmascript/exercises/transpose/example.js +12 -0
  100. data/tracks/ecmascript/exercises/transpose/package.json +71 -0
  101. data/tracks/ecmascript/exercises/transpose/transpose.spec.js +67 -0
  102. data/tracks/ecmascript/exercises/triangle/package.json +5 -3
  103. data/tracks/ecmascript/exercises/trinary/package.json +5 -3
  104. data/tracks/ecmascript/exercises/twelve-days/package.json +5 -3
  105. data/tracks/ecmascript/exercises/two-bucket/package.json +5 -3
  106. data/tracks/ecmascript/exercises/two-fer/package.json +5 -3
  107. data/tracks/ecmascript/exercises/word-count/package.json +5 -3
  108. data/tracks/ecmascript/exercises/word-search/package.json +5 -3
  109. data/tracks/ecmascript/exercises/wordy/package.json +5 -3
  110. data/tracks/ecmascript/package-lock.json +6219 -0
  111. data/tracks/ecmascript/package.json +5 -3
  112. data/tracks/erlang/exercises/collatz-conjecture/src/collatz_conjecture.erl +3 -4
  113. data/tracks/erlang/exercises/collatz-conjecture/src/example.erl +3 -3
  114. data/tracks/erlang/exercises/collatz-conjecture/test/collatz_conjecture_tests.erl +13 -9
  115. data/tracks/erlang/exercises/hello-world/src/hello_world.erl +2 -2
  116. data/tracks/erlang/exercises/leap/src/example.erl +1 -1
  117. data/tracks/erlang/exercises/leap/src/leap.erl +3 -3
  118. data/tracks/erlang/exercises/leap/test/leap_tests.erl +9 -9
  119. data/tracks/erlang/testgen/src/testgen.erl +16 -13
  120. data/tracks/erlang/testgen/src/tgen.erl +65 -38
  121. data/tracks/erlang/testgen/src/tgen_collatz-conjecture.erl +38 -0
  122. data/tracks/erlang/testgen/src/tgen_hello-world.erl +11 -19
  123. data/tracks/erlang/testgen/src/tgen_leap.erl +31 -0
  124. data/tracks/erlang/testgen/src/tgs.erl +80 -0
  125. data/tracks/fsharp/exercises/alphametics/AlphameticsTest.fs +78 -23
  126. data/tracks/fsharp/exercises/anagram/AnagramTest.fs +66 -34
  127. data/tracks/fsharp/exercises/connect/ConnectTest.fs +81 -68
  128. data/tracks/fsharp/exercises/connect/Example.fs +9 -5
  129. data/tracks/fsharp/exercises/food-chain/Example.fs +5 -9
  130. data/tracks/fsharp/exercises/food-chain/FoodChain.fs +2 -2
  131. data/tracks/fsharp/exercises/food-chain/FoodChainTest.fs +143 -75
  132. data/tracks/fsharp/exercises/hamming/Example.fs +8 -4
  133. data/tracks/fsharp/exercises/hamming/Hamming.fs +1 -1
  134. data/tracks/fsharp/exercises/hamming/HammingTest.fs +53 -13
  135. data/tracks/fsharp/exercises/house/Example.fs +5 -6
  136. data/tracks/fsharp/exercises/house/House.fs +3 -1
  137. data/tracks/fsharp/exercises/house/HouseTest.fs +272 -96
  138. data/tracks/fsharp/exercises/meetup/Example.fs +1 -1
  139. data/tracks/fsharp/exercises/meetup/Meetup.fs +1 -1
  140. data/tracks/fsharp/exercises/meetup/MeetupTest.fs +384 -73
  141. data/tracks/fsharp/exercises/ocr-numbers/Example.fs +43 -35
  142. data/tracks/fsharp/exercises/ocr-numbers/OcrNumbersTest.fs +160 -125
  143. data/tracks/fsharp/exercises/two-fer/Example.fs +4 -2
  144. data/tracks/fsharp/exercises/two-fer/TwoFer.fs +1 -1
  145. data/tracks/fsharp/exercises/two-fer/TwoFerTest.fs +7 -4
  146. data/tracks/fsharp/generators/Common.fs +6 -2
  147. data/tracks/fsharp/generators/Exercise.fs +14 -13
  148. data/tracks/fsharp/generators/Generators.fs +145 -2
  149. data/tracks/fsharp/generators/Options.fs +4 -6
  150. data/tracks/fsharp/generators/Output.fs +2 -2
  151. data/tracks/fsharp/generators/Program.fs +4 -3
  152. data/tracks/java/exercises/saddle-points/README.md +1 -1
  153. data/tracks/java/exercises/two-fer/README.md +0 -28
  154. data/tracks/javascript/exercises/beer-song/example.js +18 -14
  155. data/tracks/kotlin/exercises/saddle-points/README.md +1 -1
  156. data/tracks/kotlin/exercises/two-fer/README.md +0 -28
  157. data/tracks/lua/config.json +12 -0
  158. data/tracks/lua/exercises/collatz-conjecture/README.md +43 -0
  159. data/tracks/lua/exercises/collatz-conjecture/collatz-conjecture_spec.lua +33 -0
  160. data/tracks/lua/exercises/collatz-conjecture/example.lua +16 -0
  161. data/tracks/python/config.json +4 -1
  162. data/tracks/python/exercises/binary-search/binary_search_test.py +2 -0
  163. data/tracks/python/exercises/change/change_test.py +2 -0
  164. data/tracks/python/exercises/circular-buffer/circular_buffer_test.py +56 -50
  165. data/tracks/python/exercises/forth/example.py +3 -1
  166. data/tracks/python/exercises/forth/forth_test.py +43 -26
  167. data/tracks/python/exercises/nth-prime/nth_prime.py +1 -1
  168. data/tracks/python/exercises/rna-transcription/README.md +5 -0
  169. data/tracks/python/exercises/rna-transcription/example.py +1 -1
  170. data/tracks/python/exercises/rna-transcription/rna_transcription_test.py +7 -4
  171. data/tracks/python/exercises/robot-simulator/robot_simulator_test.py +9 -7
  172. data/tracks/python/exercises/saddle-points/saddle_points_test.py +15 -5
  173. data/tracks/python/exercises/simple-cipher/simple_cipher.py +7 -1
  174. data/tracks/python/exercises/word-count/example.py +6 -4
  175. data/tracks/python/exercises/word-count/word_count_test.py +49 -22
  176. data/tracks/python/exercises/word-search/word_search_test.py +104 -12
  177. data/tracks/rust/.travis.yml +2 -0
  178. data/tracks/rust/README.md +5 -0
  179. data/tracks/rust/_test/check-exercises.sh +0 -6
  180. data/tracks/rust/_test/ensure-lib-src-rs-exist.sh +19 -0
  181. data/tracks/rust/_test/ensure-stubs-compile.sh +26 -0
  182. data/tracks/rust/config.json +12 -0
  183. data/tracks/rust/config/exercise-readme-insert.md +3 -2
  184. data/tracks/rust/docs/ABOUT.md +2 -2
  185. data/tracks/rust/docs/LEARNING.md +1 -1
  186. data/tracks/rust/docs/RESOURCES.md +1 -1
  187. data/tracks/rust/docs/TESTS.md +2 -2
  188. data/tracks/rust/exercises/accumulate/README.md +3 -2
  189. data/tracks/rust/exercises/acronym/README.md +3 -2
  190. data/tracks/rust/exercises/all-your-base/README.md +3 -2
  191. data/tracks/rust/exercises/allergies/README.md +3 -2
  192. data/tracks/rust/exercises/alphametics/README.md +3 -2
  193. data/tracks/rust/exercises/anagram/README.md +3 -2
  194. data/tracks/rust/exercises/atbash-cipher/README.md +3 -2
  195. data/tracks/rust/exercises/beer-song/README.md +3 -2
  196. data/tracks/rust/exercises/beer-song/src/lib.rs +2 -2
  197. data/tracks/rust/exercises/binary-search/README.md +3 -2
  198. data/tracks/rust/exercises/bob/README.md +3 -2
  199. data/tracks/rust/exercises/bob/src/lib.rs +1 -1
  200. data/tracks/rust/exercises/bowling/README.md +3 -2
  201. data/tracks/rust/exercises/bracket-push/HINTS.md +1 -1
  202. data/tracks/rust/exercises/bracket-push/README.md +4 -3
  203. data/tracks/rust/exercises/circular-buffer/README.md +3 -2
  204. data/tracks/rust/exercises/clock/README.md +3 -2
  205. data/tracks/rust/exercises/collatz-conjecture/README.md +3 -2
  206. data/tracks/rust/exercises/collatz-conjecture/src/lib.rs +1 -1
  207. data/tracks/rust/exercises/crypto-square/README.md +3 -2
  208. data/tracks/rust/exercises/custom-set/README.md +3 -2
  209. data/tracks/rust/exercises/decimal/.meta/ALLOWED_TO_NOT_COMPILE +2 -0
  210. data/tracks/rust/exercises/decimal/README.md +3 -2
  211. data/tracks/rust/exercises/difference-of-squares/README.md +3 -2
  212. data/tracks/rust/exercises/difference-of-squares/src/lib.rs +3 -3
  213. data/tracks/rust/exercises/dominoes/README.md +3 -2
  214. data/tracks/rust/exercises/etl/README.md +3 -2
  215. data/tracks/rust/exercises/forth/README.md +3 -2
  216. data/tracks/rust/exercises/forth/src/lib.rs +3 -0
  217. data/tracks/rust/exercises/gigasecond/README.md +3 -2
  218. data/tracks/rust/exercises/grade-school/README.md +3 -2
  219. data/tracks/rust/exercises/grains/README.md +3 -2
  220. data/tracks/rust/exercises/hamming/README.md +3 -2
  221. data/tracks/rust/exercises/hello-world/GETTING_STARTED.md +1 -1
  222. data/tracks/rust/exercises/hello-world/README.md +3 -2
  223. data/tracks/rust/exercises/hexadecimal/README.md +3 -2
  224. data/tracks/rust/exercises/isogram/.gitignore +8 -0
  225. data/tracks/rust/exercises/isogram/Cargo.toml +3 -0
  226. data/tracks/rust/exercises/isogram/README.md +52 -0
  227. data/tracks/rust/exercises/isogram/example.rs +12 -0
  228. data/tracks/rust/exercises/isogram/src/lib.rs +0 -0
  229. data/tracks/rust/exercises/isogram/tests/isogram.rs +72 -0
  230. data/tracks/rust/exercises/largest-series-product/README.md +3 -2
  231. data/tracks/rust/exercises/leap/README.md +3 -2
  232. data/tracks/rust/exercises/leap/src/lib.rs +1 -1
  233. data/tracks/rust/exercises/luhn-from/README.md +3 -2
  234. data/tracks/rust/exercises/luhn-trait/.meta/description.md +2 -2
  235. data/tracks/rust/exercises/luhn-trait/README.md +5 -4
  236. data/tracks/rust/exercises/luhn/README.md +3 -2
  237. data/tracks/rust/exercises/minesweeper/README.md +3 -2
  238. data/tracks/rust/exercises/nth-prime/README.md +3 -2
  239. data/tracks/rust/exercises/nucleotide-codons/README.md +3 -2
  240. data/tracks/rust/exercises/nucleotide-count/README.md +3 -2
  241. data/tracks/rust/exercises/ocr-numbers/README.md +3 -2
  242. data/tracks/rust/exercises/pangram/README.md +3 -2
  243. data/tracks/rust/exercises/parallel-letter-frequency/HINTS.md +1 -1
  244. data/tracks/rust/exercises/parallel-letter-frequency/README.md +4 -3
  245. data/tracks/rust/exercises/pascals-triangle/README.md +3 -2
  246. data/tracks/rust/exercises/perfect-numbers/README.md +3 -2
  247. data/tracks/rust/exercises/phone-number/README.md +3 -2
  248. data/tracks/rust/exercises/pig-latin/README.md +3 -2
  249. data/tracks/rust/exercises/poker/README.md +3 -2
  250. data/tracks/rust/exercises/prime-factors/README.md +3 -2
  251. data/tracks/rust/exercises/protein-translation/README.md +3 -2
  252. data/tracks/rust/exercises/proverb/README.md +3 -2
  253. data/tracks/rust/exercises/proverb/src/lib.rs +1 -1
  254. data/tracks/rust/exercises/pythagorean-triplet/README.md +3 -2
  255. data/tracks/rust/exercises/queen-attack/README.md +3 -2
  256. data/tracks/rust/exercises/raindrops/README.md +3 -2
  257. data/tracks/rust/exercises/raindrops/src/lib.rs +1 -1
  258. data/tracks/rust/exercises/react/README.md +3 -2
  259. data/tracks/rust/exercises/rectangles/README.md +3 -2
  260. data/tracks/rust/exercises/rna-transcription/README.md +3 -2
  261. data/tracks/rust/exercises/robot-name/README.md +3 -2
  262. data/tracks/rust/exercises/robot-simulator/README.md +3 -2
  263. data/tracks/rust/exercises/roman-numerals/README.md +3 -2
  264. data/tracks/rust/exercises/rotational-cipher/README.md +3 -2
  265. data/tracks/rust/exercises/run-length-encoding/README.md +3 -2
  266. data/tracks/rust/exercises/say/README.md +3 -2
  267. data/tracks/rust/exercises/scrabble-score/README.md +3 -2
  268. data/tracks/rust/exercises/sieve/README.md +3 -2
  269. data/tracks/rust/exercises/space-age/README.md +3 -2
  270. data/tracks/rust/exercises/sublist/README.md +3 -2
  271. data/tracks/rust/exercises/sum-of-multiples/README.md +3 -2
  272. data/tracks/rust/exercises/sum-of-multiples/src/lib.rs +1 -1
  273. data/tracks/rust/exercises/tournament/README.md +3 -2
  274. data/tracks/rust/exercises/triangle/HINTS.md +2 -2
  275. data/tracks/rust/exercises/triangle/README.md +5 -4
  276. data/tracks/rust/exercises/variable-length-quantity/README.md +3 -2
  277. data/tracks/rust/exercises/word-count/README.md +3 -2
  278. data/tracks/rust/exercises/wordy/README.md +3 -2
  279. metadata +38 -3
  280. data/tracks/ecmascript/yarn.lock +0 -3144
@@ -1,4 +1,4 @@
1
1
  // return Ok(x) where x is the number of steps required to reach 1
2
2
  pub fn collatz(n: u64) -> Result<u64, &'static str> {
3
-
3
+ unimplemented!()
4
4
  }
@@ -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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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
@@ -0,0 +1,2 @@
1
+ Stub doesn't compile because operations like +, - are not found.
2
+ However, giving stubs to the traits would reduce the student's learning.
@@ -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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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
 
@@ -1,11 +1,11 @@
1
1
  pub fn square_of_sum(n: usize) -> usize {
2
-
2
+ unimplemented!()
3
3
  }
4
4
 
5
5
  pub fn sum_of_squares(n: usize) -> usize {
6
-
6
+ unimplemented!()
7
7
  }
8
8
 
9
9
  pub fn difference(n: usize) -> usize {
10
-
10
+ unimplemented!()
11
11
  }
@@ -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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Getting Started chapter in the Rust book](https://doc.rust-lang.org/stable/book/getting-started.html).
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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 [Crates and Modules](https://doc.rust-lang.org/stable/book/crates-and-modules.html) chapter if you
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
- [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html
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,3 @@
1
+ [package]
2
+ name = "isogram"
3
+ version = "1.2.0"
@@ -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
+ }