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
@@ -5,34 +5,54 @@ open NUnit.Framework
5
5
  open Alphametics
6
6
 
7
7
  [<Test>]
8
- let ``Can solve short puzzles`` () =
8
+ let ``Puzzle with three letters`` () =
9
9
  let actual = solve "I + BB == ILL"
10
10
  let expected = ['I', 1; 'B', 9; 'L', 0] |> Map.ofList |> Some
11
11
  Assert.That(actual, Is.EqualTo(expected))
12
12
 
13
13
  [<Test>]
14
14
  [<Ignore("Remove to run test")>]
15
- let ``Can solve long puzzles`` () =
16
- let actual = solve "SEND + MORE == MONEY"
17
- let expected = ['S', 9; 'E', 5; 'N', 6; 'D', 7; 'M', 1; 'O', 0; 'R', 8; 'Y', 2] |> Map.ofList |> Some
15
+ let ``Solution must have unique value for each letter`` () =
16
+ let actual = solve "A == B"
17
+ Assert.That(actual, Is.EqualTo(None))
18
+
19
+ [<Test>]
20
+ [<Ignore("Remove to run test")>]
21
+ let ``Leading zero solution is invalid`` () =
22
+ let actual = solve "ACA + DD == BD"
23
+ Assert.That(actual, Is.EqualTo(None))
24
+
25
+ [<Test>]
26
+ [<Ignore("Remove to run test")>]
27
+ let ``Puzzle with four letters`` () =
28
+ let actual = solve "AS + A == MOM"
29
+ let expected = ['A', 9; 'S', 2; 'M', 1; 'O', 0] |> Map.ofList |> Some
18
30
  Assert.That(actual, Is.EqualTo(expected))
19
31
 
20
32
  [<Test>]
21
33
  [<Ignore("Remove to run test")>]
22
- let ``Can solve puzzles with multiplication`` () =
23
- let actual = solve "IF * DR == DORI"
24
- let expected = ['I', 8; 'F', 2; 'D', 3; 'R', 9; 'O', 1] |> Map.ofList |> Some
34
+ let ``Puzzle with six letters`` () =
35
+ let actual = solve "NO + NO + TOO == LATE"
36
+ let expected = ['N', 7; 'O', 4; 'T', 9; 'L', 1; 'A', 0; 'E', 2] |> Map.ofList |> Some
25
37
  Assert.That(actual, Is.EqualTo(expected))
26
38
 
27
39
  [<Test>]
28
40
  [<Ignore("Remove to run test")>]
29
- let ``Can solve puzzles with any boolean expression`` () =
30
- let actual = solve "PI * R ^ 2 == AREA"
31
- let expected = ['P', 9; 'I', 6; 'R', 7; 'A', 4; 'E', 0] |> Map.ofList |> Some
41
+ let ``Puzzle with seven letters`` () =
42
+ let actual = solve "HE + SEES + THE == LIGHT"
43
+ let expected = ['E', 4; 'G', 2; 'H', 5; 'I', 0; 'L', 1; 'S', 9; 'T', 7] |> Map.ofList |> Some
44
+ Assert.That(actual, Is.EqualTo(expected))
45
+
46
+ [<Test>]
47
+ [<Ignore("Remove to run test")>]
48
+ let ``Puzzle with eight letters`` () =
49
+ let actual = solve "SEND + MORE == MONEY"
50
+ let expected = ['S', 9; 'E', 5; 'N', 6; 'D', 7; 'M', 1; 'O', 0; 'R', 8; 'Y', 2] |> Map.ofList |> Some
32
51
  Assert.That(actual, Is.EqualTo(expected))
33
52
 
34
53
  [<Test>]
35
54
  [<Ignore("Remove to run test")>]
36
- let ``Cannot solve unsolvable puzzles`` () =
37
- let actual = solve "A * B == A + B"
38
- Assert.That(actual, Is.EqualTo(None))
55
+ let ``Puzzle with ten letters`` () =
56
+ let actual = solve "AND + A + STRONG + OFFENSE + AS + A + GOOD == DEFENSE"
57
+ let expected = ['A', 5; 'D', 3; 'E', 4; 'F', 7; 'G', 8; 'N', 0; 'O', 2; 'R', 1; 'S', 6; 'T', 9] |> Map.ofList |> Some
58
+ Assert.That(actual, Is.EqualTo(expected))
@@ -1,60 +1,25 @@
1
1
  module Alphametics
2
2
 
3
3
  open System
4
- open System.Text.RegularExpressions
5
-
6
- type Operators = Plus | Mult | Pow | Eq
7
-
8
- type Token =
9
- | Operand of int
10
- | Operator of Operators
11
-
12
- let (|Int|_|) str =
13
- match Int32.TryParse(str) with
14
- | (true, i) -> Some i
15
- | _ -> None
16
-
17
- let token (str: string) =
18
- match str with
19
- | "+" -> Operator Plus
20
- | "*" -> Operator Mult
21
- | "^" -> Operator Pow
22
- | "==" -> Operator Eq
23
- | Int i -> Operand i
24
- | _ -> failwith "Invalid token"
25
4
 
26
- let breakBy item list =
27
- match List.tryFindIndex (fun x -> x = item) list with
28
- | None -> None
29
- | Some i -> Some (list.[0..i - 1], list.[i + 1..])
30
-
31
- let tokenize (str: string) =
32
- str.Split()
33
- |> List.ofArray
34
- |> List.map token
35
- |> breakBy (Operator Eq)
36
-
37
- let operators =
38
- [(Pow, fun x y -> pown x y |> Operand);
39
- (Mult, fun x y -> x * y |> Operand);
40
- (Plus, fun x y -> x + y |> Operand)]
41
-
42
- let rec simplifyOperator (operator, op) acc remainder =
43
- match remainder with
44
- | Operand x::Operator y::Operand z::xs when y = operator -> simplifyOperator (operator, op) (op x z::acc) xs
45
- | x::xs -> simplifyOperator (operator, op) (x::acc) xs
46
- | [] -> acc |> List.rev
5
+ open FParsec
6
+ open System.Text.RegularExpressions
47
7
 
48
- let simplify equation = operators |> List.fold (fun acc operator -> simplifyOperator operator [] acc) equation
8
+ let plus = pstring " + "
9
+ let equal = pstring " == "
10
+ let operand = many1Satisfy isAsciiUpper
11
+ let expression = sepBy operand plus
12
+ let equation = expression .>> equal .>>. expression
49
13
 
50
- let solveEquation (left, right) = simplify left = simplify right
14
+ let parseToOption parser (input: string) =
15
+ match run parser input with
16
+ | Success(result, _, _) -> Some result
17
+ | Failure(errorMsg, _, _) -> None
51
18
 
52
- let equationIsCorrect input =
53
- match tokenize input with
54
- | None -> false
55
- | Some equation -> solveEquation equation
19
+ let parseEquation = parseToOption equation
56
20
 
57
- let chars (str: string) = str |> Seq.filter (Char.IsLetter) |> Set.ofSeq
21
+ let operandToInt (map: Map<char, int>) (operand: string) =
22
+ Seq.fold (fun acc x -> acc * 10 + Map.find x map) 0 operand
58
23
 
59
24
  let generateCombinations length =
60
25
  let rec helper remaining options =
@@ -65,23 +30,23 @@ let generateCombinations length =
65
30
 
66
31
  helper length ([0..9] |> Set.ofList)
67
32
 
68
- let generateMaps (str: string) =
69
- let c = chars str
70
- let nonZeroChars =
71
- Regex.Matches (str, "([A-Z])[A-Z]*")
72
- |> Seq.cast<Match>
73
- |> Seq.map (fun m -> m.Groups |> Seq.cast<Group> |> Seq.map (fun n -> n.Value.Chars 0) |> Seq.item 1)
74
- |> Set.ofSeq
33
+ let generateMaps (leftOperands, rightOperands) =
34
+ let operands = leftOperands @ rightOperands
35
+ let chars = operands |> String.concat "" |> Set.ofSeq
36
+ let nonZeroChars = operands |> List.map Seq.head |> Set.ofList
75
37
 
76
- generateCombinations (Set.count c)
77
- |> Seq.map (Seq.zip c >> Map.ofSeq)
38
+ generateCombinations (Set.count chars)
39
+ |> Seq.map (Seq.zip chars >> Map.ofSeq)
78
40
  |> Seq.filter (fun m -> Set.forall (fun x -> Map.find x m <> 0) nonZeroChars)
79
41
 
80
- let trySolve (input: string) map =
81
- map
82
- |> Map.fold (fun (acc: string) (key: char) (value: int) -> acc.Replace(string key, string value)) input
83
- |> equationIsCorrect
42
+ let sumOperands lettersToDigits = List.sumBy (operandToInt lettersToDigits)
43
+
44
+ let trySolve (leftOperands, rightOperands) lettersToDigits =
45
+ let left = sumOperands lettersToDigits leftOperands
46
+ let right = sumOperands lettersToDigits rightOperands
47
+ left = right
84
48
 
85
49
  let solve input =
86
- generateMaps input
87
- |> Seq.tryFind (trySolve input)
50
+ match parseEquation input with
51
+ | Some equation -> Seq.tryFind (trySolve equation) (generateMaps equation)
52
+ | None -> None
@@ -6,40 +6,40 @@ open BinarySearchTree
6
6
  [<Test>]
7
7
  let ``Data is retained`` () =
8
8
  let tree = singleton 4
9
- Assert.That(tree |> value, Is.EqualTo(4))
9
+ Assert.That(tree |> value, Is.EqualTo(Some 4))
10
10
 
11
11
  [<Test>]
12
12
  [<Ignore("Remove to run test")>]
13
13
  let ``Inserting less`` () =
14
14
  let tree = singleton 4 |> insert 2
15
- Assert.That(tree |> value, Is.EqualTo(4))
16
- Assert.That(tree |> left |> Option.map value, Is.EqualTo(Some 2))
15
+ Assert.That(tree |> value, Is.EqualTo(Some 4))
16
+ Assert.That(tree |> left |> Option.bind value, Is.EqualTo(Some 2))
17
17
 
18
18
  [<Test>]
19
19
  [<Ignore("Remove to run test")>]
20
20
  let ``Inserting same`` () =
21
21
  let tree = singleton 4 |> insert 4
22
- Assert.That(tree |> value, Is.EqualTo(4))
23
- Assert.That(tree |> left |> Option.map value, Is.EqualTo(Some 4))
22
+ Assert.That(tree |> value, Is.EqualTo(Some 4))
23
+ Assert.That(tree |> left |> Option.bind value, Is.EqualTo(Some 4))
24
24
 
25
25
  [<Test>]
26
26
  [<Ignore("Remove to run test")>]
27
27
  let ``Inserting greater`` () =
28
28
  let tree = singleton 4 |> insert 5
29
- Assert.That(tree |> value, Is.EqualTo(4))
30
- Assert.That(tree |> right |> Option.map value, Is.EqualTo(Some 5))
29
+ Assert.That(tree |> value, Is.EqualTo(Some 4))
30
+ Assert.That(tree |> right |> Option.bind value, Is.EqualTo(Some 5))
31
31
 
32
32
  [<Test>]
33
33
  [<Ignore("Remove to run test")>]
34
34
  let ``Complex tree`` () =
35
35
  let tree = fromList [4; 2; 6; 1; 3; 7; 5]
36
- Assert.That(tree |> value, Is.EqualTo(4))
37
- Assert.That(tree |> left |> Option.map value, Is.EqualTo(Some 2))
38
- Assert.That(tree |> left |> Option.bind (fun x -> x |> left) |> Option.map value, Is.EqualTo(Some 1))
39
- Assert.That(tree |> left |> Option.bind (fun x -> x |> right) |> Option.map value, Is.EqualTo(Some 3))
40
- Assert.That(tree |> right |> Option.map value, Is.EqualTo(Some 6))
41
- Assert.That(tree |> right |> Option.bind (fun x -> x |> left) |> Option.map value, Is.EqualTo(Some 5))
42
- Assert.That(tree |> right |> Option.bind (fun x -> x |> right) |> Option.map value, Is.EqualTo(Some 7))
36
+ Assert.That(tree |> value, Is.EqualTo(Some 4))
37
+ Assert.That(tree |> left |> Option.bind value, Is.EqualTo(Some 2))
38
+ Assert.That(tree |> left |> Option.bind (fun x -> x |> left) |> Option.bind value, Is.EqualTo(Some 1))
39
+ Assert.That(tree |> left |> Option.bind (fun x -> x |> right) |> Option.bind value, Is.EqualTo(Some 3))
40
+ Assert.That(tree |> right |> Option.bind value, Is.EqualTo(Some 6))
41
+ Assert.That(tree |> right |> Option.bind (fun x -> x |> left) |> Option.bind value, Is.EqualTo(Some 5))
42
+ Assert.That(tree |> right |> Option.bind (fun x -> x |> right) |> Option.bind value, Is.EqualTo(Some 7))
43
43
 
44
44
  [<Test>]
45
45
  [<Ignore("Remove to run test")>]
@@ -2,30 +2,33 @@
2
2
 
3
3
  type Node = { left: Node option; value: int; right: Node option }
4
4
 
5
- let left node = node.left
5
+ let left node = node.left
6
6
  let right node = node.right
7
- let value node = node.value
7
+ let value node = Some node.value
8
8
 
9
9
  let singleton value = { left = None; right = None; value = value }
10
10
 
11
11
  let rec insert newValue (tree: Node) =
12
- let loop newValue node =
13
- match node with
14
- | Some tree -> Some (insert newValue tree)
15
- | None -> Some (singleton newValue)
12
+ let loop newValue =
13
+ function
14
+ | Some x -> Some <| insert newValue x
15
+ | None -> Some <| singleton newValue
16
16
 
17
- if newValue <= tree.value then { tree with left = loop newValue tree.left }
18
- else { tree with right = loop newValue tree.right }
17
+ match newValue with
18
+ | x when x <= tree.value ->
19
+ { tree with left = loop newValue tree.left }
20
+ | _ ->
21
+ { tree with right = loop newValue tree.right }
19
22
 
20
23
  let toList tree =
21
- let rec loop x =
22
- match x with
24
+ let rec loop =
25
+ function
23
26
  | Some node -> loop node.left @ [node.value] @ loop node.right
24
27
  | None -> []
25
28
 
26
- loop (Some tree)
29
+ loop <| Some tree
27
30
 
28
- let fromList list =
29
- match list with
31
+ let fromList =
32
+ function
30
33
  | [] -> failwith "Cannot create tree from empty list."
31
- | x::xs -> List.fold (fun acc elem -> insert elem acc) (singleton x) xs
34
+ | x::xs -> List.fold (fun acc elem -> insert elem acc) (singleton x) xs
@@ -68,11 +68,6 @@ let ``Triangles with negative sides are illegal`` () =
68
68
  let ``Triangles violating triangle inequality are illegal`` () =
69
69
  Assert.That((fun () -> kind 1m 1m 3m |> ignore), Throws.InvalidOperationException)
70
70
 
71
- [<Test>]
72
- [<Ignore("Remove to run test")>]
73
- let ``Triangles violating triangle inequality are illegal 2`` () =
74
- Assert.That((fun () -> kind 2m 4m 2m |> ignore), Throws.InvalidOperationException)
75
-
76
71
  [<Test>]
77
72
  [<Ignore("Remove to run test")>]
78
73
  let ``Triangles violating triangle inequality are illegal 3`` () =
data/tracks/go/README.md CHANGED
@@ -28,8 +28,8 @@ This is because this repo only imports from the standard library and isn't expec
28
28
 
29
29
  ## Contributing Guide
30
30
 
31
- Please be familiar with the [contributing guide](https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md#the-exercise-data)
32
- in the x-api repository. This describes how all the language tracks are put together, as well as details about
31
+ Please be familiar with the [contributing guide](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md)
32
+ in the x-common repository. This describes how all the language tracks are put together, as well as details about
33
33
  the common metadata, and high-level information about contributing to existing problems and adding new problems.
34
34
 
35
35
  ## Problem Versioning
@@ -89,7 +89,7 @@ See `leap/example_gen.go` for an example of how this can be done.
89
89
 
90
90
  Whenever the shared JSON data changes, the test cases will need to be regenerated. To do this, make sure that the
91
91
  x-common repository has been cloned in the same parent-directory as the xgo repository. Then `cd` to the `xgo`
92
- directory and run `go run <problem>/example_gen.go`.
92
+ directory and run `go run exercises/<problem>/example_gen.go`.
93
93
 
94
94
  You should see that the `<problem>/test_cases.go` file has changed. Commit the change.
95
95
 
@@ -51,18 +51,25 @@
51
51
  "topics": [
52
52
  "Time",
53
53
  "Mathematics",
54
- "Text formatting"
54
+ "Text formatting",
55
+ "Equality"
55
56
  ]
56
57
  },
57
58
  {
58
59
  "difficulty": 1,
59
60
  "slug": "gigasecond",
60
- "topics": []
61
+ "topics": [
62
+ "Time"
63
+ ]
61
64
  },
62
65
  {
63
66
  "difficulty": 1,
64
67
  "slug": "hamming",
65
- "topics": []
68
+ "topics": [
69
+ "Control-flow (loops)",
70
+ "Equality",
71
+ "Strings"
72
+ ]
66
73
  },
67
74
  {
68
75
  "difficulty": 1,
@@ -0,0 +1,5 @@
1
+ package acronym
2
+
3
+ const testVersion = 2
4
+
5
+ func Abbreviate(string) string
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("bob.json", &j, t); err != nil {
18
+ if err := gen.Gen("bob", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("clock.json", &j, t); err != nil {
18
+ if err := gen.Gen("clock", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("connect.json", &j, t); err != nil {
18
+ if err := gen.Gen("connect", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -20,7 +20,7 @@ func main() {
20
20
  log.Fatal(err)
21
21
  }
22
22
  var j js
23
- if err := gen.Gen("custom-set.json", &j, t); err != nil {
23
+ if err := gen.Gen("custom-set", &j, t); err != nil {
24
24
  log.Fatal(err)
25
25
  }
26
26
  }
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("gigasecond.json", &j, t); err != nil {
18
+ if err := gen.Gen("gigasecond", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("hamming.json", &j, t); err != nil {
18
+ if err := gen.Gen("hamming", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("largest-series-product.json", &j, t); err != nil {
18
+ if err := gen.Gen("largest-series-product", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -1,17 +1,15 @@
1
1
  package leap
2
2
 
3
3
  // Source: exercism/x-common
4
- // Commit: 945d08e Merge pull request #50 from soniakeys/master
4
+ // Commit: be6fa53 leap: Rewrite the test cases and their descriptions
5
5
 
6
6
  var testCases = []struct {
7
7
  year int
8
8
  expected bool
9
9
  description string
10
10
  }{
11
- {1996, true, "leap year"},
12
- {1997, false, "non-leap year"},
13
- {1998, false, "non-leap even year"},
14
- {1900, false, "century"},
15
- {2400, true, "fourth century"},
16
- {2000, true, "Y2K"},
11
+ {2015, false, "year not divisible by 4: common year"},
12
+ {2016, true, "year divisible by 4, not divisible by 100: leap year"},
13
+ {2100, false, "year divisible by 100, not divisible by 400: common year"},
14
+ {2000, true, "year divisible by 400: leap year"},
17
15
  }
@@ -1,6 +1,6 @@
1
1
  package leap
2
2
 
3
- const testVersion = 2
3
+ const testVersion = 3
4
4
 
5
5
  func IsLeapYear(i int) bool {
6
6
  return i%4 == 0 && i%100 != 0 || i%400 == 0
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("leap.json", &j, t); err != nil {
18
+ if err := gen.Gen("leap", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -4,7 +4,7 @@
4
4
  package leap
5
5
 
6
6
  // testVersion should match the targetTestVersion in the test file.
7
- const testVersion = 2
7
+ const testVersion = 3
8
8
 
9
9
  // It's good style to write a comment here documenting IsLeapYear.
10
10
  func IsLeapYear(int) bool {
@@ -7,7 +7,7 @@ import "testing"
7
7
  // Also define a testVersion with a value that matches
8
8
  // the targetTestVersion here.
9
9
 
10
- const targetTestVersion = 2
10
+ const targetTestVersion = 3
11
11
 
12
12
  func TestLeapYears(t *testing.T) {
13
13
  if testVersion != targetTestVersion {
@@ -17,7 +17,7 @@ func main() {
17
17
  log.Fatal(err)
18
18
  }
19
19
  var j js
20
- if err := gen.Gen("meetup.json", &j, t); err != nil {
20
+ if err := gen.Gen("meetup", &j, t); err != nil {
21
21
  log.Fatal(err)
22
22
  }
23
23
  }
@@ -95,14 +95,9 @@ func TestSequenceHistograms(t *testing.T) {
95
95
  }
96
96
 
97
97
  func BenchmarkSequenceHistograms(b *testing.B) {
98
- b.StopTimer()
99
98
  for _, tt := range histogramTests {
100
99
  for i := 0; i < b.N; i++ {
101
- b.StartTimer()
102
-
103
100
  tt.strand.Counts()
104
-
105
- b.StopTimer()
106
101
  }
107
102
  }
108
103
  }
@@ -0,0 +1,5 @@
1
+ package pangram
2
+
3
+ const testVersion = 1
4
+
5
+ func IsPangram(string) bool
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("raindrops.json", &j, t); err != nil {
18
+ if err := gen.Gen("raindrops", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("rna-transcription.json", &j, t); err != nil {
18
+ if err := gen.Gen("rna-transcription", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("roman-numerals.json", &j, t); err != nil {
18
+ if err := gen.Gen("roman-numerals", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@ func main() {
15
15
  log.Fatal(err)
16
16
  }
17
17
  var j js
18
- if err := gen.Gen("word-count.json", &j, t); err != nil {
18
+ if err := gen.Gen("word-count", &j, t); err != nil {
19
19
  log.Fatal(err)
20
20
  }
21
21
  }
data/tracks/go/gen/gen.go CHANGED
@@ -44,10 +44,11 @@ func init() {
44
44
  }
45
45
  }
46
46
 
47
- func Gen(jFile string, j interface{}, t *template.Template) error {
47
+ func Gen(exercise string, j interface{}, t *template.Template) error {
48
48
  if dirMetadata == "" {
49
49
  return errors.New("unable to determine current path")
50
50
  }
51
+ jFile := filepath.Join("exercises", exercise, "canonical-data.json")
51
52
  // find and read the json source file
52
53
  jPath, jOri, jCommit := getPath(jFile)
53
54
  jSrc, err := ioutil.ReadFile(filepath.Join(jPath, jFile))
@@ -93,7 +94,7 @@ func getPath(jFile string) (jPath, jOri, jCommit string) {
93
94
  if jPath = os.Getenv("EXTEST"); jPath > "" {
94
95
  return jPath, "local file", "" // override
95
96
  }
96
- c := exec.Command("git", "log", "-1", "--oneline")
97
+ c := exec.Command("git", "log", "-1", "--oneline", jFile)
97
98
  c.Dir = dirMetadata
98
99
  ori, err := c.Output()
99
100
  if err != nil {
@@ -1,4 +1,4 @@
1
1
  module Accumulate (accumulate) where
2
2
 
3
3
  accumulate :: (a -> b) -> [a] -> [b]
4
- accumulate = undefined
4
+ accumulate = error "You need to implement this function."
@@ -1,4 +1,4 @@
1
1
  module Base (rebase) where
2
2
 
3
3
  rebase :: Integral a => a -> a -> [a] -> Maybe [a]
4
- rebase inputBase outputBase inputDigits = undefined
4
+ rebase inputBase outputBase inputDigits = error "You need to implement this function."
@@ -11,7 +11,7 @@ data Allergen = Eggs
11
11
  deriving (Eq)
12
12
 
13
13
  allergies :: Int -> [Allergen]
14
- allergies = undefined
14
+ allergies = error "You need to implement this function."
15
15
 
16
16
  isAllergicTo :: Allergen -> Int -> Bool
17
- isAllergicTo = undefined
17
+ isAllergicTo = error "You need to implement this function."
@@ -1,4 +1,4 @@
1
1
  module Alphametics (solve) where
2
2
 
3
3
  solve :: String -> Maybe [(Char, Int)]
4
- solve puzzle = undefined
4
+ solve puzzle = error "You need to implement this function."
@@ -1,4 +1,4 @@
1
1
  module Anagram (anagramsFor) where
2
2
 
3
3
  anagramsFor :: String -> [String] -> [String]
4
- anagramsFor = undefined
4
+ anagramsFor = error "You need to implement this function."
@@ -1,7 +1,7 @@
1
1
  module Atbash (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."