trackler 2.0.6.11 → 2.0.6.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +4 -4
  2. data/common/CONTRIBUTING.md +6 -1
  3. data/common/exercises/difference-of-squares/metadata.yml +1 -1
  4. data/common/exercises/luhn/canonical-data.json +2 -2
  5. data/common/exercises/rectangles/canonical-data.json +25 -0
  6. data/common/exercises/rectangles/description.md +11 -3
  7. data/lib/trackler/version.rb +1 -1
  8. data/tracks/ceylon/config.json +9 -0
  9. data/tracks/ceylon/exercises/anagram/source/anagram/AnagramTest.ceylon +38 -39
  10. data/tracks/ceylon/exercises/bracket-push/source/bracketpush/BracketsTest.ceylon +28 -29
  11. data/tracks/ceylon/exercises/largest-series-product/example/Series.ceylon +13 -0
  12. data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/Series.ceylon +5 -0
  13. data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/SeriesTest.ceylon +30 -0
  14. data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/module.ceylon +3 -0
  15. data/tracks/csharp/config.json +41 -0
  16. data/tracks/csharp/exercises/alphametics/AlphameticsTest.cs +122 -0
  17. data/tracks/csharp/exercises/alphametics/Example.cs +139 -0
  18. data/tracks/csharp/exercises/dot-dsl/DotDslTest.cs +91 -0
  19. data/tracks/csharp/exercises/dot-dsl/Example.cs +90 -0
  20. data/tracks/csharp/exercises/dot-dsl/HINTS.md +2 -0
  21. data/tracks/csharp/exercises/error-handling/ErrorHandlingTest.cs +65 -0
  22. data/tracks/csharp/exercises/error-handling/Example.cs +34 -0
  23. data/tracks/csharp/exercises/exercises.csproj +1 -1
  24. data/tracks/csharp/exercises/hangman/Example.cs +85 -0
  25. data/tracks/csharp/exercises/hangman/HangmanTest.cs +140 -0
  26. data/tracks/csharp/exercises/ledger/Example.cs +106 -0
  27. data/tracks/csharp/exercises/ledger/Ledger.cs +166 -0
  28. data/tracks/csharp/exercises/ledger/LedgerTest.cs +168 -0
  29. data/tracks/elixir/exercises/allergies/allergies_test.exs +2 -2
  30. data/tracks/elixir/exercises/markdown/example.exs +3 -3
  31. data/tracks/elixir/exercises/phone-number/example.exs +0 -2
  32. data/tracks/elixir/exercises/queen-attack/example.exs +1 -1
  33. data/tracks/elixir/exercises/wordy/example.exs +6 -6
  34. data/tracks/elixir/exercises/zipper/zipper_test.exs +12 -12
  35. data/tracks/elixir/mix.exs +1 -1
  36. data/tracks/fsharp/config.json +8 -8
  37. data/tracks/fsharp/docs/ABOUT.md +4 -0
  38. data/tracks/fsharp/exercises/alphametics/AlphameticsTest.fs +33 -13
  39. data/tracks/fsharp/exercises/alphametics/Example.fs +29 -64
  40. data/tracks/fsharp/exercises/binary-search-tree/BinarySearchTreeTest.fs +14 -14
  41. data/tracks/fsharp/exercises/binary-search-tree/Example.fs +17 -14
  42. data/tracks/fsharp/exercises/triangle/TriangleTest.fs +0 -5
  43. data/tracks/go/README.md +3 -3
  44. data/tracks/go/config.json +10 -3
  45. data/tracks/go/exercises/acronym/acronym.go +5 -0
  46. data/tracks/go/exercises/bob/example_gen.go +1 -1
  47. data/tracks/go/exercises/clock/example_gen.go +1 -1
  48. data/tracks/go/exercises/connect/example_gen.go +1 -1
  49. data/tracks/go/exercises/custom-set/example_gen.go +1 -1
  50. data/tracks/go/exercises/gigasecond/example_gen.go +1 -1
  51. data/tracks/go/exercises/hamming/example_gen.go +1 -1
  52. data/tracks/go/exercises/largest-series-product/example_gen.go +1 -1
  53. data/tracks/go/exercises/leap/cases_test.go +5 -7
  54. data/tracks/go/exercises/leap/example.go +1 -1
  55. data/tracks/go/exercises/leap/example_gen.go +1 -1
  56. data/tracks/go/exercises/leap/leap.go +1 -1
  57. data/tracks/go/exercises/leap/leap_test.go +1 -1
  58. data/tracks/go/exercises/meetup/example_gen.go +1 -1
  59. data/tracks/go/exercises/nucleotide-count/nucleotide_count_test.go +0 -5
  60. data/tracks/go/exercises/pangram/pangram.go +5 -0
  61. data/tracks/go/exercises/raindrops/example_gen.go +1 -1
  62. data/tracks/go/exercises/rna-transcription/example_gen.go +1 -1
  63. data/tracks/go/exercises/roman-numerals/example_gen.go +1 -1
  64. data/tracks/go/exercises/word-count/example_gen.go +1 -1
  65. data/tracks/go/gen/gen.go +3 -2
  66. data/tracks/haskell/exercises/accumulate/src/Accumulate.hs +1 -1
  67. data/tracks/haskell/exercises/all-your-base/src/Base.hs +1 -1
  68. data/tracks/haskell/exercises/allergies/src/Allergies.hs +2 -2
  69. data/tracks/haskell/exercises/alphametics/src/Alphametics.hs +1 -1
  70. data/tracks/haskell/exercises/anagram/src/Anagram.hs +1 -1
  71. data/tracks/haskell/exercises/atbash-cipher/src/Atbash.hs +2 -2
  72. data/tracks/haskell/exercises/bank-account/src/BankAccount.hs +4 -4
  73. data/tracks/haskell/exercises/binary/src/Binary.hs +1 -1
  74. data/tracks/haskell/exercises/binary-search-tree/src/BST.hs +8 -8
  75. data/tracks/haskell/exercises/bob/src/Bob.hs +1 -1
  76. data/tracks/haskell/exercises/bowling/src/Bowling.hs +1 -1
  77. data/tracks/haskell/exercises/change/src/Change.hs +1 -1
  78. data/tracks/haskell/exercises/clock/src/Clock.hs +4 -4
  79. data/tracks/haskell/exercises/connect/src/Connect.hs +1 -1
  80. data/tracks/haskell/exercises/crypto-square/src/CryptoSquare.hs +1 -1
  81. data/tracks/haskell/exercises/custom-set/src/CustomSet.hs +13 -13
  82. data/tracks/haskell/exercises/difference-of-squares/src/Squares.hs +3 -3
  83. data/tracks/haskell/exercises/dominoes/src/Dominoes.hs +1 -1
  84. data/tracks/haskell/exercises/etl/src/ETL.hs +1 -1
  85. data/tracks/haskell/exercises/forth/src/Forth.hs +3 -3
  86. data/tracks/haskell/exercises/gigasecond/src/Gigasecond.hs +1 -1
  87. data/tracks/haskell/exercises/go-counting/src/Counting.hs +2 -2
  88. data/tracks/haskell/exercises/grade-school/src/School.hs +4 -4
  89. data/tracks/haskell/exercises/grains/src/Grains.hs +2 -2
  90. data/tracks/haskell/exercises/hamming/src/Hamming.hs +1 -1
  91. data/tracks/haskell/exercises/hexadecimal/src/Hexadecimal.hs +1 -1
  92. data/tracks/haskell/exercises/kindergarten-garden/src/Garden.hs +3 -3
  93. data/tracks/haskell/exercises/largest-series-product/src/Series.hs +1 -1
  94. data/tracks/haskell/exercises/leap/src/LeapYear.hs +1 -1
  95. data/tracks/haskell/exercises/lens-person/src/Person.hs +4 -4
  96. data/tracks/haskell/exercises/linked-list/src/Deque.hs +5 -5
  97. data/tracks/haskell/exercises/list-ops/src/ListOps.hs +8 -8
  98. data/tracks/haskell/exercises/luhn/src/Luhn.hs +5 -5
  99. data/tracks/haskell/exercises/matrix/src/Matrix.hs +10 -10
  100. data/tracks/haskell/exercises/meetup/src/Meetup.hs +1 -1
  101. data/tracks/haskell/exercises/minesweeper/src/Minesweeper.hs +1 -1
  102. data/tracks/haskell/exercises/nth-prime/src/Prime.hs +1 -1
  103. data/tracks/haskell/exercises/nucleotide-count/src/DNA.hs +2 -2
  104. data/tracks/haskell/exercises/ocr-numbers/src/OCR.hs +1 -1
  105. data/tracks/haskell/exercises/octal/src/Octal.hs +2 -2
  106. data/tracks/haskell/exercises/palindrome-products/src/Palindromes.hs +2 -2
  107. data/tracks/haskell/exercises/parallel-letter-frequency/src/Frequency.hs +1 -1
  108. data/tracks/haskell/exercises/pascals-triangle/src/Triangle.hs +1 -1
  109. data/tracks/haskell/exercises/phone-number/src/Phone.hs +3 -3
  110. data/tracks/haskell/exercises/pig-latin/src/PigLatin.hs +1 -1
  111. data/tracks/haskell/exercises/pov/src/POV.hs +2 -2
  112. data/tracks/haskell/exercises/prime-factors/src/PrimeFactors.hs +1 -1
  113. data/tracks/haskell/exercises/pythagorean-triplet/src/Triplet.hs +3 -3
  114. data/tracks/haskell/exercises/queen-attack/src/Queens.hs +2 -2
  115. data/tracks/haskell/exercises/raindrops/src/Raindrops.hs +1 -1
  116. data/tracks/haskell/exercises/rna-transcription/src/DNA.hs +1 -1
  117. data/tracks/haskell/exercises/robot-name/src/Robot.hs +3 -3
  118. data/tracks/haskell/exercises/robot-simulator/src/Robot.hs +6 -6
  119. data/tracks/haskell/exercises/roman-numerals/src/Roman.hs +1 -1
  120. data/tracks/haskell/exercises/run-length-encoding/src/RunLength.hs +2 -2
  121. data/tracks/haskell/exercises/saddle-points/src/Matrix.hs +1 -1
  122. data/tracks/haskell/exercises/say/src/Say.hs +1 -1
  123. data/tracks/haskell/exercises/scrabble-score/src/Scrabble.hs +2 -2
  124. data/tracks/haskell/exercises/secret-handshake/src/SecretHandshake.hs +1 -1
  125. data/tracks/haskell/exercises/series/src/Series.hs +1 -1
  126. data/tracks/haskell/exercises/sgf-parsing/src/Sgf.hs +1 -1
  127. data/tracks/haskell/exercises/sieve/src/Sieve.hs +1 -1
  128. data/tracks/haskell/exercises/simple-cipher/src/Cipher.hs +3 -3
  129. data/tracks/haskell/exercises/simple-linked-list/src/LinkedList.hs +8 -8
  130. data/tracks/haskell/exercises/space-age/src/SpaceAge.hs +1 -1
  131. data/tracks/haskell/exercises/strain/src/Strain.hs +2 -2
  132. data/tracks/haskell/exercises/sublist/src/Sublist.hs +1 -1
  133. data/tracks/haskell/exercises/sum-of-multiples/src/SumOfMultiples.hs +1 -1
  134. data/tracks/haskell/exercises/triangle/src/Triangle.hs +1 -1
  135. data/tracks/haskell/exercises/trinary/src/Trinary.hs +2 -2
  136. data/tracks/haskell/exercises/word-count/src/WordCount.hs +1 -1
  137. data/tracks/haskell/exercises/wordy/src/WordProblem.hs +1 -1
  138. data/tracks/haskell/exercises/zebra-puzzle/src/ZebraPuzzle.hs +1 -1
  139. data/tracks/haskell/exercises/zipper/src/Zipper.hs +9 -9
  140. data/tracks/java/docs/MAINTAINING.md +48 -0
  141. data/tracks/java/exercises/queen-attack/src/test/java/QueenAttackCalculatorTest.java +51 -51
  142. data/tracks/kotlin/exercises/etl/src/example/kotlin/ETL.kt +1 -1
  143. data/tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt +19 -19
  144. data/tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt +5 -0
  145. data/tracks/lisp/docs/ABOUT.md +9 -0
  146. data/tracks/lua/exercises/transpose/example.lua +1 -1
  147. data/tracks/lua/exercises/transpose/transpose_spec.lua +16 -0
  148. data/tracks/pascal/config.json +36 -36
  149. data/tracks/pascal/exercises/bob/uBobTests.pas +0 -1
  150. data/tracks/pascal/exercises/hamming/uHammingTests.pas +0 -1
  151. data/tracks/pascal/exercises/leap/uLeapTests.pas +0 -1
  152. data/tracks/pascal/exercises/saddle-points/uSaddlePointsExample.pas +11 -0
  153. data/tracks/pascal/exercises/saddle-points/uSaddlePointsTests.pas +9 -1
  154. data/tracks/perl6/exercises/atbash-cipher/cipher.t +1 -1
  155. data/tracks/php/config.json +7 -0
  156. data/tracks/php/exercises/robot-simulator/example.php +148 -0
  157. data/tracks/php/exercises/robot-simulator/robot-simulator_test.php +168 -0
  158. data/tracks/pony/config.json +16 -7
  159. data/tracks/pony/exercises/roman-numerals/example.pony +35 -0
  160. data/tracks/pony/exercises/roman-numerals/test.pony +45 -0
  161. data/tracks/python/requirements-travis.txt +1 -1
  162. data/tracks/ruby/.rubocop.yml +1 -1
  163. data/tracks/ruby/bin/enable-executable +1 -1
  164. data/tracks/ruby/bin/executable-tests-check +1 -1
  165. data/tracks/ruby/exercises/acronym/example.tt +2 -3
  166. data/tracks/ruby/exercises/all-your-base/example.tt +2 -2
  167. data/tracks/ruby/exercises/alphametics/example.tt +2 -2
  168. data/tracks/ruby/exercises/anagram/example.tt +2 -3
  169. data/tracks/ruby/exercises/binary/example.tt +2 -3
  170. data/tracks/ruby/exercises/bowling/example.tt +2 -3
  171. data/tracks/ruby/exercises/bracket-push/example.tt +2 -3
  172. data/tracks/ruby/exercises/clock/example.tt +2 -3
  173. data/tracks/ruby/exercises/connect/example.rb +1 -1
  174. data/tracks/ruby/exercises/connect/example.tt +1 -1
  175. data/tracks/ruby/exercises/custom-set/example.tt +2 -3
  176. data/tracks/ruby/exercises/diamond/example.rb +1 -1
  177. data/tracks/ruby/exercises/difference-of-squares/example.tt +2 -3
  178. data/tracks/ruby/exercises/dominoes/example.tt +2 -2
  179. data/tracks/ruby/exercises/gigasecond/example.tt +2 -3
  180. data/tracks/ruby/exercises/grains/example.tt +2 -2
  181. data/tracks/ruby/exercises/hamming/example.tt +2 -3
  182. data/tracks/ruby/exercises/hello-world/example.tt +1 -2
  183. data/tracks/ruby/exercises/isogram/example.tt +2 -2
  184. data/tracks/ruby/exercises/largest-series-product/example.tt +2 -4
  185. data/tracks/ruby/exercises/leap/example.tt +2 -3
  186. data/tracks/ruby/exercises/nth-prime/example.tt +2 -4
  187. data/tracks/ruby/exercises/pangram/example.tt +2 -2
  188. data/tracks/ruby/exercises/queen-attack/example.tt +2 -3
  189. data/tracks/ruby/exercises/raindrops/example.tt +2 -3
  190. data/tracks/ruby/exercises/rna-transcription/example.tt +2 -3
  191. data/tracks/ruby/exercises/roman-numerals/example.tt +2 -3
  192. data/tracks/ruby/exercises/run-length-encoding/example.tt +2 -3
  193. data/tracks/ruby/exercises/sieve/example.tt +2 -4
  194. data/tracks/ruby/exercises/simple-linked-list/simple_linked_list_test.rb +6 -6
  195. data/tracks/ruby/exercises/tournament/example.tt +2 -3
  196. data/tracks/ruby/exercises/transpose/example.tt +2 -3
  197. data/tracks/ruby/exercises/triangle/example.tt +2 -3
  198. data/tracks/ruby/exercises/two-bucket/example.tt +2 -3
  199. data/tracks/ruby/exercises/word-count/example.tt +2 -3
  200. data/tracks/ruby/exercises/wordy/example.tt +2 -2
  201. data/tracks/ruby/lib/acronym_cases.rb +2 -0
  202. data/tracks/ruby/lib/all_your_base_cases.rb +3 -1
  203. data/tracks/ruby/lib/alphametics_cases.rb +6 -4
  204. data/tracks/ruby/lib/anagram_cases.rb +2 -0
  205. data/tracks/ruby/lib/binary_cases.rb +2 -0
  206. data/tracks/ruby/lib/bowling_cases.rb +2 -0
  207. data/tracks/ruby/lib/bracket_push_cases.rb +2 -0
  208. data/tracks/ruby/lib/clock_cases.rb +2 -0
  209. data/tracks/ruby/lib/connect_cases.rb +2 -0
  210. data/tracks/ruby/lib/custom_set_cases.rb +2 -0
  211. data/tracks/ruby/lib/difference_of_squares_cases.rb +2 -0
  212. data/tracks/ruby/lib/dominoes_cases.rb +2 -0
  213. data/tracks/ruby/lib/exercise_cases.rb +2 -0
  214. data/tracks/ruby/lib/generator/files/track_files.rb +3 -3
  215. data/tracks/ruby/lib/generator/files.rb +1 -1
  216. data/tracks/ruby/lib/generator/template_values.rb +5 -14
  217. data/tracks/ruby/lib/gigasecond_cases.rb +2 -0
  218. data/tracks/ruby/lib/grains_cases.rb +3 -1
  219. data/tracks/ruby/lib/hamming_cases.rb +2 -0
  220. data/tracks/ruby/lib/hello_world_cases.rb +2 -0
  221. data/tracks/ruby/lib/isogram_cases.rb +3 -1
  222. data/tracks/ruby/lib/largest_series_product_cases.rb +2 -0
  223. data/tracks/ruby/lib/leap_cases.rb +2 -0
  224. data/tracks/ruby/lib/nth_prime_cases.rb +2 -0
  225. data/tracks/ruby/lib/pangram_cases.rb +3 -1
  226. data/tracks/ruby/lib/queen_attack_cases.rb +2 -0
  227. data/tracks/ruby/lib/raindrops_cases.rb +2 -0
  228. data/tracks/ruby/lib/rna_transcription_cases.rb +2 -0
  229. data/tracks/ruby/lib/roman_numerals_cases.rb +2 -0
  230. data/tracks/ruby/lib/run_length_encoding_cases.rb +2 -0
  231. data/tracks/ruby/lib/sieve_cases.rb +2 -0
  232. data/tracks/ruby/lib/tournament_cases.rb +2 -0
  233. data/tracks/ruby/lib/transpose_cases.rb +2 -0
  234. data/tracks/ruby/lib/triangle_cases.rb +2 -0
  235. data/tracks/ruby/lib/two_bucket_cases.rb +2 -0
  236. data/tracks/ruby/lib/word_count_cases.rb +2 -0
  237. data/tracks/ruby/lib/wordy_cases.rb +2 -0
  238. data/tracks/ruby/test/fixtures/xruby/exercises/alpha/example.tt +2 -2
  239. data/tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb +1 -1
  240. data/tracks/ruby/test/generator/command_line_test.rb +1 -1
  241. data/tracks/ruby/test/generator/template_values_test.rb +7 -7
  242. data/tracks/rust/.travis.yml +4 -0
  243. data/tracks/rust/_test/check-exercises.sh +11 -2
  244. data/tracks/rust/config.json +9 -0
  245. data/tracks/rust/exercises/luhn/.gitignore +7 -0
  246. data/tracks/rust/exercises/luhn/Cargo.toml +3 -0
  247. data/tracks/rust/exercises/luhn/example.rs +13 -0
  248. data/tracks/rust/exercises/luhn/tests/luhn.rs +38 -0
  249. data/tracks/rust/exercises/parallel-letter-frequency/HINTS.md +32 -0
  250. data/tracks/rust/exercises/parallel-letter-frequency/benches/benchmark.rs +99 -0
  251. data/tracks/scala/config.json +57 -1
  252. data/tracks/scala/exercises/allergies/build.sbt +2 -2
  253. data/tracks/scala/exercises/atbash-cipher/build.sbt +2 -2
  254. data/tracks/scala/exercises/bank-account/build.sbt +3 -2
  255. data/tracks/scala/exercises/binary-search-tree/build.sbt +2 -2
  256. data/tracks/scala/exercises/clock/build.sbt +2 -2
  257. data/tracks/scala/exercises/crypto-square/build.sbt +2 -2
  258. data/tracks/scala/exercises/custom-set/build.sbt +3 -2
  259. data/tracks/scala/exercises/food-chain/build.sbt +3 -2
  260. data/tracks/scala/exercises/house/build.sbt +2 -2
  261. data/tracks/scala/exercises/kindergarten-garden/build.sbt +3 -2
  262. data/tracks/scala/exercises/largest-series-product/build.sbt +2 -2
  263. data/tracks/scala/exercises/linked-list/build.sbt +3 -2
  264. data/tracks/scala/exercises/matrix/build.sbt +2 -2
  265. data/tracks/scala/exercises/minesweeper/build.sbt +2 -2
  266. data/tracks/scala/exercises/nth-prime/build.sbt +2 -2
  267. data/tracks/scala/exercises/ocr-numbers/build.sbt +2 -2
  268. data/tracks/scala/exercises/palindrome-products/build.sbt +2 -2
  269. data/tracks/scala/exercises/prime-factors/build.sbt +3 -2
  270. data/tracks/scala/exercises/queen-attack/build.sbt +2 -2
  271. data/tracks/scala/exercises/raindrops/build.sbt +2 -2
  272. data/tracks/scala/exercises/robot-simulator/build.sbt +2 -2
  273. data/tracks/scala/exercises/triangle/build.sbt +2 -2
  274. data/tracks/scala/exercises/trinary/build.sbt +2 -2
  275. data/tracks/scala/exercises/wordy/build.sbt +3 -3
  276. metadata +33 -2
@@ -1,3 +1,3 @@
1
1
  module Roman (numerals) where
2
2
 
3
- numerals = undefined
3
+ numerals = error "You need to implement this function."
@@ -1,7 +1,7 @@
1
1
  module RunLength (decode, encode) where
2
2
 
3
3
  decode :: String -> String
4
- decode = undefined
4
+ decode = error "You need to implement this function."
5
5
 
6
6
  encode :: String -> String
7
- encode = undefined
7
+ encode = error "You need to implement this function."
@@ -2,4 +2,4 @@ module Matrix (saddlePoints) where
2
2
 
3
3
  import Data.Array (Array)
4
4
 
5
- saddlePoints = undefined
5
+ saddlePoints = error "You need to implement this function."
@@ -1,3 +1,3 @@
1
1
  module Say (inEnglish) where
2
2
 
3
- inEnglish = undefined
3
+ inEnglish = error "You need to implement this function."
@@ -1,5 +1,5 @@
1
1
  module Scrabble (scoreLetter, scoreWord) where
2
2
 
3
- scoreLetter = undefined
3
+ scoreLetter = error "You need to implement this function."
4
4
 
5
- scoreWord = undefined
5
+ scoreWord = error "You need to implement this function."
@@ -1,3 +1,3 @@
1
1
  module SecretHandshake (handshake) where
2
2
 
3
- handshake = undefined
3
+ handshake = error "You need to implement this function."
@@ -1,4 +1,4 @@
1
1
  module Series (slices) where
2
2
 
3
3
  slices :: Int -> String -> [[Int]]
4
- slices n xs = undefined
4
+ slices n xs = error "You need to implement this function."
@@ -5,4 +5,4 @@ import Data.Text (Text)
5
5
  import Data.Tree (Tree)
6
6
 
7
7
  parseSgf :: Text -> Maybe (Tree (Map Text [Text]))
8
- parseSgf = undefined
8
+ parseSgf = error "You need to implement this function."
@@ -1,3 +1,3 @@
1
1
  module Sieve (primesUpTo) where
2
2
 
3
- primesUpTo = undefined
3
+ primesUpTo = error "You need to implement this function."
@@ -1,10 +1,10 @@
1
1
  module Cipher (caesarDecode, caesarEncode, caesarEncodeRandom) where
2
2
 
3
3
  caesarDecode :: String -> String -> String
4
- caesarDecode = undefined
4
+ caesarDecode = error "You need to implement this function."
5
5
 
6
6
  caesarEncode :: String -> String -> String
7
- caesarEncode = undefined
7
+ caesarEncode = error "You need to implement this function."
8
8
 
9
9
  caesarEncodeRandom :: String -> IO (String, String)
10
- caesarEncodeRandom = undefined
10
+ caesarEncodeRandom = error "You need to implement this function."
@@ -13,25 +13,25 @@ module LinkedList
13
13
  data LinkedList a = Dummy
14
14
 
15
15
  datum :: LinkedList a -> a
16
- datum = undefined
16
+ datum = error "You need to implement this function."
17
17
 
18
18
  fromList :: [a] -> LinkedList a
19
- fromList = undefined
19
+ fromList = error "You need to implement this function."
20
20
 
21
21
  isNil :: LinkedList a -> Bool
22
- isNil = undefined
22
+ isNil = error "You need to implement this function."
23
23
 
24
24
  new :: a -> LinkedList a -> LinkedList a
25
- new = undefined
25
+ new = error "You need to implement this function."
26
26
 
27
27
  next :: LinkedList a -> LinkedList a
28
- next = undefined
28
+ next = error "You need to implement this function."
29
29
 
30
30
  nil :: LinkedList a
31
- nil = undefined
31
+ nil = error "You need to implement this function."
32
32
 
33
33
  reverseLinkedList :: LinkedList a -> LinkedList a
34
- reverseLinkedList = undefined
34
+ reverseLinkedList = error "You need to implement this function."
35
35
 
36
36
  toList :: LinkedList a -> [a]
37
- toList = undefined
37
+ toList = error "You need to implement this function."
@@ -10,4 +10,4 @@ data Planet = Mercury
10
10
  | Neptune
11
11
 
12
12
  ageOn :: Planet -> Float -> Float
13
- ageOn planet seconds = undefined
13
+ ageOn planet seconds = error "You need to implement this function."
@@ -1,7 +1,7 @@
1
1
  module Strain (keep, discard) where
2
2
 
3
3
  discard :: (a -> Bool) -> [a] -> [a]
4
- discard = undefined
4
+ discard = error "You need to implement this function."
5
5
 
6
6
  keep :: (a -> Bool) -> [a] -> [a]
7
- keep = undefined
7
+ keep = error "You need to implement this function."
@@ -3,4 +3,4 @@ module Sublist (Sublist(..), sublist) where
3
3
  data Sublist = Equal | Sublist | Superlist | Unequal deriving (Eq, Show)
4
4
 
5
5
  sublist :: [a] -> [a] -> Sublist
6
- sublist = undefined
6
+ sublist = error "You need to implement this function."
@@ -1,3 +1,3 @@
1
1
  module SumOfMultiples (sumOfMultiples) where
2
2
 
3
- sumOfMultiples = undefined
3
+ sumOfMultiples = error "You need to implement this function."
@@ -6,4 +6,4 @@ data TriangleType = Equilateral
6
6
  | Illegal
7
7
  deriving (Eq, Show)
8
8
 
9
- triangleType = undefined
9
+ triangleType = error "You need to implement this function."
@@ -1,5 +1,5 @@
1
1
  module Trinary (readTri, showTri) where
2
2
 
3
- readTri = undefined
3
+ readTri = error "You need to implement this function."
4
4
 
5
- showTri = undefined
5
+ showTri = error "You need to implement this function."
@@ -1,4 +1,4 @@
1
1
  module WordCount (wordCount) where
2
2
 
3
3
  wordCount :: String -> [(String, Int)]
4
- wordCount xs = undefined
4
+ wordCount xs = error "You need to implement this function."
@@ -1,3 +1,3 @@
1
1
  module WordProblem (answer) where
2
2
 
3
- answer = undefined
3
+ answer = error "You need to implement this function."
@@ -8,5 +8,5 @@ data Solution = Solution { waterDrinker :: Resident
8
8
  } deriving (Eq, Show)
9
9
 
10
10
  solve :: Solution
11
- solve = undefined
11
+ solve = error "You need to implement this function."
12
12
 
@@ -19,28 +19,28 @@ data BinTree a = BT { btValue :: a
19
19
  data Zipper a = Dummy deriving (Eq, Show)
20
20
 
21
21
  fromTree :: BinTree a -> Zipper a
22
- fromTree = undefined
22
+ fromTree = error "You need to implement this function."
23
23
 
24
24
  toTree :: Zipper a -> BinTree a
25
- toTree = undefined
25
+ toTree = error "You need to implement this function."
26
26
 
27
27
  value :: Zipper a -> a
28
- value = undefined
28
+ value = error "You need to implement this function."
29
29
 
30
30
  left :: Zipper a -> Maybe (Zipper a)
31
- left = undefined
31
+ left = error "You need to implement this function."
32
32
 
33
33
  right :: Zipper a -> Maybe (Zipper a)
34
- right = undefined
34
+ right = error "You need to implement this function."
35
35
 
36
36
  up :: Zipper a -> Maybe (Zipper a)
37
- up = undefined
37
+ up = error "You need to implement this function."
38
38
 
39
39
  setValue :: a -> Zipper a -> Zipper a
40
- setValue = undefined
40
+ setValue = error "You need to implement this function."
41
41
 
42
42
  setLeft :: Maybe (BinTree a) -> Zipper a -> Zipper a
43
- setLeft = undefined
43
+ setLeft = error "You need to implement this function."
44
44
 
45
45
  setRight :: Maybe (BinTree a) -> Zipper a -> Zipper a
46
- setRight = undefined
46
+ setRight = error "You need to implement this function."
@@ -0,0 +1,48 @@
1
+ # Welcome!
2
+
3
+ This is a guide/reference for maintainers of the Java track.
4
+
5
+ - [Your New Permissions](#your-new-permissions)
6
+ - [Maintainer Guides](#maintainer-guides)
7
+ - [The Project Board](#the-project-board)
8
+ - [Miscellaneous](#miscellaneous)
9
+
10
+ ## Your New Permissions
11
+
12
+ You now have write access to four repositories. "write access" means you can: review, reject, accept and merge PRs; and push changes to these repos. Despite having permissions to push, we tend to see review of even our own PRs.
13
+
14
+ - [x-common](https://github.com/exercism/x-common) — the library of exercises.
15
+ - [discussions](https://github.com/exercism/discussions) — the place where project-wide conversations happen.
16
+ [issues sorted by most recently updated.](https://github.com/exercism/discussions/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
17
+ - [xjava](https://github.com/exercism/xjava) — yeah... you know what this one is. :)
18
+ - [todo](https://github.com/exercism/todo) — not really used... might just go away completely in the future.
19
+
20
+ ## Maintainer Guides
21
+
22
+ - **[exercism.io/docs/maintaining-a-track.md](https://github.com/exercism/exercism.io/blob/master/docs/maintaining-a-track.md)**
23
+ - [exercism.io/docs/getting-involved-in-a-track.md](https://github.com/exercism/exercism.io/blob/master/docs/getting-involved-in-a-track.md)
24
+ - [exercism.io/docs/reviewing-a-pull-request.md](https://github.com/exercism/exercism.io/blob/master/docs/reviewing-a-pull-request.md)
25
+
26
+ ## The Project Board
27
+
28
+ GitHub issues are great, there's no way to easily set priorities.
29
+ To do this, we're using a GitHub Project: https://github.com/exercism/xjava/projects/2.
30
+
31
+ - **Epics** — issues that really represent bigger ideas. These inspire creating a set of smaller issues to be elaborated...
32
+ - **Icebox** — issues that just needs a little more detail to be "ready to play"...
33
+ - **Backlog** — issues ready to be worked. When we start working on an issue, we move it to the next column...
34
+ - **Current** — issues in progress. When we've considered it done, we move the card to...
35
+ - **Delivered** — completed issues that could use another pair of eyes. When these are reviewed they get moved to...
36
+ - **Done** — issues we've complete. Every so often, we get together and it's nice to review what we've completed.
37
+ Once reviewed, we remove them from this Project.
38
+
39
+ The point of this board is to make clear our shared priorities. It's a tool you can use.
40
+ However, if you have an idea and want to implement it, you can just do it; it does not have to be added to this board.
41
+
42
+ ## Miscellaneous
43
+
44
+ - Issues marked with "policy" are current "team agreements": [exercism?label:policy](https://github.com/search?q=org%3Aexercism+label%3Apolicy).
45
+ This label is described in [discussions#96](https://github.com/exercism/discussions/issues/96).
46
+ - Exercism has a Twitter account: [@Exercism.io](https://twitter.com/exercism_io); and a mailing list: https://tinyletter.com/exercism
47
+
48
+ **Please feel free to ask any questions. In our thinking, asking questions is far smarter than guessing.**
@@ -16,119 +16,119 @@ public final class QueenAttackCalculatorTest {
16
16
  public ExpectedException expectedException = ExpectedException.none();
17
17
 
18
18
  @Test
19
- public void testCoordinateWithNegativeRankNotAllowed() {
20
- expectedException.expect(IllegalArgumentException.class);
21
- expectedException.expectMessage("Coordinate must have positive rank.");
19
+ public void testQueensThatDoNotShareRankFileOrDiagonalCannotAttack() {
20
+ final QueenAttackCalculator calculator
21
+ = new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(6, 6));
22
22
 
23
- new BoardCoordinate(-2, 2);
23
+ assertFalse(calculator.canQueensAttackOneAnother());
24
24
  }
25
25
 
26
26
  @Ignore
27
27
  @Test
28
- public void testCoordinateWithRankGreaterThan7NotAllowed() {
29
- expectedException.expect(IllegalArgumentException.class);
30
- expectedException.expectMessage("Coordinate must have rank <= 7.");
28
+ public void testQueensCanAttackOnTheSameRank() {
29
+ final QueenAttackCalculator calculator
30
+ = new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(2, 6));
31
31
 
32
- new BoardCoordinate(8, 4);
32
+ assertTrue(calculator.canQueensAttackOneAnother());
33
33
  }
34
34
 
35
35
  @Ignore
36
36
  @Test
37
- public void testCoordinateWithNegativeFileNotAllowed() {
38
- expectedException.expect(IllegalArgumentException.class);
39
- expectedException.expectMessage("Coordinate must have positive file.");
37
+ public void testQueensCanAttackOnTheSameFile() {
38
+ final QueenAttackCalculator calculator
39
+ = new QueenAttackCalculator(new BoardCoordinate(4, 5), new BoardCoordinate(2, 5));
40
40
 
41
- new BoardCoordinate(2, -2);
41
+ assertTrue(calculator.canQueensAttackOneAnother());
42
42
  }
43
43
 
44
44
  @Ignore
45
45
  @Test
46
- public void testCoordinateWithFileGreaterThan7NotAllowed() {
47
- expectedException.expect(IllegalArgumentException.class);
48
- expectedException.expectMessage("Coordinate must have file <= 7.");
46
+ public void testQueensCanAttackOnFirstDiagonal() {
47
+ final QueenAttackCalculator calculator
48
+ = new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(0, 4));
49
49
 
50
- new BoardCoordinate(4, 8);
50
+ assertTrue(calculator.canQueensAttackOneAnother());
51
51
  }
52
52
 
53
53
  @Ignore
54
54
  @Test
55
- public void testNullCoordinateNotAllowed() {
56
- expectedException.expect(IllegalArgumentException.class);
57
- expectedException.expectMessage("You must supply valid board coordinates for both Queens.");
55
+ public void testQueensCanAttackOnSecondDiagonal() {
56
+ final QueenAttackCalculator calculator
57
+ = new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(3, 1));
58
58
 
59
- new QueenAttackCalculator(null, new BoardCoordinate(0, 7));
59
+ assertTrue(calculator.canQueensAttackOneAnother());
60
60
  }
61
61
 
62
62
  @Ignore
63
63
  @Test
64
- public void testQueensMustNotOccupyTheSameSquare() {
65
- expectedException.expect(IllegalArgumentException.class);
66
- expectedException.expectMessage("Queens may not occupy the same board coordinate.");
64
+ public void testQueensCanAttackOnThirdDiagonal() {
65
+ final QueenAttackCalculator calculator
66
+ = new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(1, 1));
67
67
 
68
- new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(2, 2));
68
+ assertTrue(calculator.canQueensAttackOneAnother());
69
69
  }
70
70
 
71
71
  @Ignore
72
72
  @Test
73
- public void testQueensThatDoNotShareRankFileOrDiagonalCannotAttack() {
73
+ public void testQueensCanAttackOnFourthDiagonal() {
74
74
  final QueenAttackCalculator calculator
75
- = new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(6, 6));
75
+ = new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(5, 5));
76
76
 
77
- assertFalse(calculator.canQueensAttackOneAnother());
77
+ assertTrue(calculator.canQueensAttackOneAnother());
78
78
  }
79
79
 
80
80
  @Ignore
81
81
  @Test
82
- public void testQueensCanAttackOnTheSameRank() {
83
- final QueenAttackCalculator calculator
84
- = new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(2, 6));
82
+ public void testCoordinateWithNegativeRankNotAllowed() {
83
+ expectedException.expect(IllegalArgumentException.class);
84
+ expectedException.expectMessage("Coordinate must have positive rank.");
85
85
 
86
- assertTrue(calculator.canQueensAttackOneAnother());
86
+ new BoardCoordinate(-2, 2);
87
87
  }
88
88
 
89
89
  @Ignore
90
90
  @Test
91
- public void testQueensCanAttackOnTheSameFile() {
92
- final QueenAttackCalculator calculator
93
- = new QueenAttackCalculator(new BoardCoordinate(4, 5), new BoardCoordinate(2, 5));
91
+ public void testCoordinateWithRankGreaterThan7NotAllowed() {
92
+ expectedException.expect(IllegalArgumentException.class);
93
+ expectedException.expectMessage("Coordinate must have rank <= 7.");
94
94
 
95
- assertTrue(calculator.canQueensAttackOneAnother());
95
+ new BoardCoordinate(8, 4);
96
96
  }
97
97
 
98
98
  @Ignore
99
99
  @Test
100
- public void testQueensCanAttackOnFirstDiagonal() {
101
- final QueenAttackCalculator calculator
102
- = new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(0, 4));
100
+ public void testCoordinateWithNegativeFileNotAllowed() {
101
+ expectedException.expect(IllegalArgumentException.class);
102
+ expectedException.expectMessage("Coordinate must have positive file.");
103
103
 
104
- assertTrue(calculator.canQueensAttackOneAnother());
104
+ new BoardCoordinate(2, -2);
105
105
  }
106
106
 
107
107
  @Ignore
108
108
  @Test
109
- public void testQueensCanAttackOnSecondDiagonal() {
110
- final QueenAttackCalculator calculator
111
- = new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(3, 1));
109
+ public void testCoordinateWithFileGreaterThan7NotAllowed() {
110
+ expectedException.expect(IllegalArgumentException.class);
111
+ expectedException.expectMessage("Coordinate must have file <= 7.");
112
112
 
113
- assertTrue(calculator.canQueensAttackOneAnother());
113
+ new BoardCoordinate(4, 8);
114
114
  }
115
115
 
116
116
  @Ignore
117
117
  @Test
118
- public void testQueensCanAttackOnThirdDiagonal() {
119
- final QueenAttackCalculator calculator
120
- = new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(1, 1));
118
+ public void testNullCoordinateNotAllowed() {
119
+ expectedException.expect(IllegalArgumentException.class);
120
+ expectedException.expectMessage("You must supply valid board coordinates for both Queens.");
121
121
 
122
- assertTrue(calculator.canQueensAttackOneAnother());
122
+ new QueenAttackCalculator(null, new BoardCoordinate(0, 7));
123
123
  }
124
124
 
125
125
  @Ignore
126
126
  @Test
127
- public void testQueensCanAttackOnFourthDiagonal() {
128
- final QueenAttackCalculator calculator
129
- = new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(5, 5));
127
+ public void testQueensMustNotOccupyTheSameSquare() {
128
+ expectedException.expect(IllegalArgumentException.class);
129
+ expectedException.expectMessage("Queens may not occupy the same board coordinate.");
130
130
 
131
- assertTrue(calculator.canQueensAttackOneAnother());
131
+ new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(2, 2));
132
132
  }
133
133
 
134
134
  }
@@ -1,5 +1,5 @@
1
1
  object ETL {
2
- fun transform(old: Map<Int, Collection<String>>): Map<String, Int> {
2
+ fun transform(old: Map<Int, Collection<Char>>): Map<Char, Int> {
3
3
  return old.flatMap { mapEntry -> mapEntry.value.map { word -> Pair(word.toLowerCase(), mapEntry.key) } }.toMap()
4
4
  }
5
5
  }
@@ -5,24 +5,24 @@ class ETLTest {
5
5
 
6
6
  @Test
7
7
  fun transformOneValue() {
8
- val old = mapOf(1 to listOf("WORLD"))
9
- val expected = mapOf("world" to 1)
8
+ val old = mapOf(1 to listOf('a'))
9
+ val expected = mapOf('a' to 1)
10
10
 
11
11
  assertEquals(expected, ETL.transform(old))
12
12
  }
13
13
 
14
14
  @Test
15
15
  fun transformMoreValues() {
16
- val old = mapOf(1 to listOf("WORLD", "GSCHOOLERS"))
17
- val expected = mapOf("world" to 1, "gschoolers" to 1)
16
+ val old = mapOf(1 to listOf('A', 'E', 'I'))
17
+ val expected = mapOf('a' to 1, 'e' to 1, 'i' to 1)
18
18
 
19
19
  assertEquals(expected, ETL.transform(old))
20
20
  }
21
21
 
22
22
  @Test
23
23
  fun moreKeys() {
24
- val old = mapOf(1 to listOf("APPLE", "ARTICHOKE"), 2 to listOf("BOAT", "BALLERINA"))
25
- val expected = mapOf("apple" to 1, "artichoke" to 1, "boat" to 2, "ballerina" to 2)
24
+ val old = mapOf(1 to listOf('A', 'E', 'I'), 2 to listOf('D', 'G'))
25
+ val expected = mapOf('a' to 1, 'e' to 1, 'i' to 1, 'd' to 2, 'g' to 2)
26
26
 
27
27
  assertEquals(expected, ETL.transform(old))
28
28
  }
@@ -30,21 +30,21 @@ class ETLTest {
30
30
  @Test
31
31
  fun fullDataset() {
32
32
  val old = mapOf(
33
- 1 to listOf("A", "E", "I", "O", "U", "L", "N", "R", "S", "T"),
34
- 2 to listOf("D", "G"),
35
- 3 to listOf("B", "C", "M", "P"),
36
- 4 to listOf("F", "H", "V", "W", "Y"),
37
- 5 to listOf("K"),
38
- 8 to listOf("J", "X"),
39
- 10 to listOf("Q", "Z")
33
+ 1 to listOf('A', 'E', 'I', 'O', 'U', 'L', 'N', 'R', 'S', 'T'),
34
+ 2 to listOf('D', 'G'),
35
+ 3 to listOf('B', 'C', 'M', 'P'),
36
+ 4 to listOf('F', 'H', 'V', 'W', 'Y'),
37
+ 5 to listOf('K'),
38
+ 8 to listOf('J', 'X'),
39
+ 10 to listOf('Q', 'Z')
40
40
  )
41
41
  val expected = mapOf(
42
- "a" to 1, "b" to 3, "c" to 3, "d" to 2, "e" to 1,
43
- "f" to 4, "g" to 2, "h" to 4, "i" to 1, "j" to 8,
44
- "k" to 5, "l" to 1, "m" to 3, "n" to 1, "o" to 1,
45
- "p" to 3, "q" to 10, "r" to 1, "s" to 1, "t" to 1,
46
- "u" to 1, "v" to 4, "w" to 4, "x" to 8, "y" to 4,
47
- "z" to 10
42
+ 'a' to 1, 'b' to 3, 'c' to 3, 'd' to 2, 'e' to 1,
43
+ 'f' to 4, 'g' to 2, 'h' to 4, 'i' to 1, 'j' to 8,
44
+ 'k' to 5, 'l' to 1, 'm' to 3, 'n' to 1, 'o' to 1,
45
+ 'p' to 3, 'q' to 10, 'r' to 1, 's' to 1, 't' to 1,
46
+ 'u' to 1, 'v' to 4, 'w' to 4, 'x' to 8, 'y' to 4,
47
+ 'z' to 10
48
48
  )
49
49
 
50
50
  assertEquals(expected, ETL.transform(old))
@@ -43,6 +43,11 @@ class PangramTest {
43
43
  fun mixedCaseAndPunctuation() {
44
44
  assertTrue(Pangrams.isPangram("\"Five quacking Zephyrs jolt my wax bed.\""))
45
45
  }
46
+
47
+ @Test
48
+ fun mixedCaseDuplicatedCharacters() {
49
+ assertFalse(Pangrams.isPangram("the quick brown fox jumps over the lazy FOX"))
50
+ }
46
51
 
47
52
  @Test
48
53
  fun nonAsciiCharacters() {
@@ -0,0 +1,9 @@
1
+ Common Lisp is an offshoot of the long-running family of Lisp programming languages.
2
+ It's a multi-paradigm programming language that allows you to choose the approach and paradigm
3
+ according to your application domain.
4
+
5
+ Common Lisp has fast prototyping capabilities, and exceptional support for object oriented programming.
6
+ It also boasts a macro system which allows you to adapt the language to your needs,
7
+ and a run-time environment which allows modification of running applications.
8
+
9
+ To learn more about Common Lisp, take a look at [the Common Lisp homepage](https://common-lisp.net/).
@@ -1,7 +1,7 @@
1
1
  local function Grid(s)
2
2
  local width = 0
3
3
  local rows = {}
4
- for row in s:gmatch('[^\n]+') do
4
+ for row in s:gmatch('([^\n]*)\n?') do
5
5
  table.insert(rows, row)
6
6
  width = math.max(width, #row)
7
7
  end
@@ -17,6 +17,22 @@ describe('transpose', function()
17
17
  assert.are.equal('S\ni\nn\ng\nl\ne\n \nl\ni\nn\ne\n.', transpose('Single line.'))
18
18
  end)
19
19
 
20
+ it('should transpose a string with empty lines', function()
21
+ local input =
22
+ '\n' ..
23
+ 'Line 2\n' ..
24
+ '\n' ..
25
+ 'L4'
26
+ local expected =
27
+ ' L L\n' ..
28
+ ' i 4\n' ..
29
+ ' n\n' ..
30
+ ' e\n' ..
31
+ ' \n' ..
32
+ ' 2'
33
+ assert.are.equal(expected, transpose(input))
34
+ end)
35
+
20
36
  it('should transpose a string with the first line longer than the second', function()
21
37
  local input =
22
38
  'The fourth line.\n' ..