trackler 2.2.1.62 → 2.2.1.63

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/all-your-base/canonical-data.json +20 -29
  4. data/problem-specifications/exercises/forth/canonical-data.json +52 -5
  5. data/problem-specifications/exercises/isbn-verifier/canonical-data.json +15 -15
  6. data/problem-specifications/exercises/protein-translation/canonical-data.json +153 -0
  7. data/problem-specifications/exercises/reverse-string/canonical-data.json +39 -0
  8. data/problem-specifications/exercises/reverse-string/description.md +5 -0
  9. data/problem-specifications/exercises/reverse-string/metadata.yml +5 -0
  10. data/tracks/c/config.json +42 -41
  11. data/tracks/csharp/config.json +13 -0
  12. data/tracks/csharp/exercises/Exercises.sln +6 -0
  13. data/tracks/csharp/exercises/isbn-verifier/Example.cs +27 -0
  14. data/tracks/csharp/exercises/isbn-verifier/IsbnVerifier.cs +9 -0
  15. data/tracks/csharp/exercises/isbn-verifier/IsbnVerifier.csproj +19 -0
  16. data/tracks/csharp/exercises/isbn-verifier/IsbnVerifierTest.cs +84 -0
  17. data/tracks/csharp/exercises/isbn-verifier/README.md +40 -0
  18. data/tracks/csharp/generators/Exercises/IsbnVerifier.cs +15 -0
  19. data/tracks/delphi/config.json +28 -28
  20. data/tracks/erlang/config.json +10 -0
  21. data/tracks/erlang/exercises/accumulate/rebar.config +1 -1
  22. data/tracks/erlang/exercises/accumulate/test/accumulate_tests.erl +9 -7
  23. data/tracks/erlang/exercises/all-your-base/rebar.config +1 -1
  24. data/tracks/erlang/exercises/all-your-base/test/all_your_base_tests.erl +26 -24
  25. data/tracks/erlang/exercises/allergies/rebar.config +1 -1
  26. data/tracks/erlang/exercises/allergies/test/allergies_tests.erl +19 -17
  27. data/tracks/erlang/exercises/anagram/rebar.config +1 -3
  28. data/tracks/erlang/exercises/anagram/test/anagram_tests.erl +14 -12
  29. data/tracks/erlang/exercises/atbash-cipher/rebar.config +1 -1
  30. data/tracks/erlang/exercises/atbash-cipher/test/atbash_cipher_tests.erl +7 -5
  31. data/tracks/erlang/exercises/bank-account/rebar.config +1 -1
  32. data/tracks/erlang/exercises/bank-account/test/bank_account_tests.erl +52 -51
  33. data/tracks/erlang/exercises/beer-song/rebar.config +30 -0
  34. data/tracks/erlang/exercises/beer-song/test/beer_song_tests.erl +11 -10
  35. data/tracks/erlang/exercises/bob/rebar.config +1 -1
  36. data/tracks/erlang/exercises/bob/test/bob_tests.erl +33 -35
  37. data/tracks/erlang/exercises/circular-buffer/rebar.config +1 -1
  38. data/tracks/erlang/exercises/circular-buffer/test/circular_buffer_tests.erl +33 -32
  39. data/tracks/erlang/exercises/clock/rebar.config +1 -1
  40. data/tracks/erlang/exercises/clock/test/clock_tests.erl +57 -50
  41. data/tracks/erlang/exercises/collatz-conjecture/rebar.config +1 -1
  42. data/tracks/erlang/exercises/collatz-conjecture/test/collatz_conjecture_tests.erl +11 -9
  43. data/tracks/erlang/exercises/complex-numbers/rebar.config +1 -1
  44. data/tracks/erlang/exercises/complex-numbers/test/complex_numbers_tests.erl +102 -76
  45. data/tracks/erlang/exercises/custom-set/rebar.config +1 -1
  46. data/tracks/erlang/exercises/custom-set/test/custom_set_tests.erl +100 -109
  47. data/tracks/erlang/exercises/difference-of-squares/rebar.config +1 -1
  48. data/tracks/erlang/exercises/difference-of-squares/test/difference_of_squares_tests.erl +8 -7
  49. data/tracks/erlang/exercises/etl/rebar.config +1 -1
  50. data/tracks/erlang/exercises/etl/test/etl_tests.erl +6 -5
  51. data/tracks/erlang/exercises/gigasecond/rebar.config +1 -1
  52. data/tracks/erlang/exercises/gigasecond/test/gigasecond_tests.erl +9 -8
  53. data/tracks/erlang/exercises/grade-school/rebar.config +1 -1
  54. data/tracks/erlang/exercises/grade-school/test/grade_school_tests.erl +27 -23
  55. data/tracks/erlang/exercises/grains/rebar.config +1 -1
  56. data/tracks/erlang/exercises/grains/test/grains_tests.erl +7 -6
  57. data/tracks/erlang/exercises/hamming/rebar.config +1 -1
  58. data/tracks/erlang/exercises/hamming/test/hamming_tests.erl +20 -23
  59. data/tracks/erlang/exercises/hello-world/rebar.config +1 -1
  60. data/tracks/erlang/exercises/hello-world/test/hello_world_tests.erl +6 -4
  61. data/tracks/erlang/exercises/isogram/rebar.config +1 -1
  62. data/tracks/erlang/exercises/isogram/test/isogram_tests.erl +14 -12
  63. data/tracks/erlang/exercises/largest-series-product/rebar.config +1 -1
  64. data/tracks/erlang/exercises/largest-series-product/test/largest_series_product_tests.erl +22 -21
  65. data/tracks/erlang/exercises/leap/rebar.config +1 -1
  66. data/tracks/erlang/exercises/leap/test/leap_tests.erl +8 -7
  67. data/tracks/erlang/exercises/luhn/rebar.config +1 -1
  68. data/tracks/erlang/exercises/luhn/test/luhn_tests.erl +18 -16
  69. data/tracks/erlang/exercises/meetup/rebar.config +1 -1
  70. data/tracks/erlang/exercises/meetup/test/meetup_tests.erl +96 -95
  71. data/tracks/erlang/exercises/nucleotide-count/rebar.config +1 -1
  72. data/tracks/erlang/exercises/nucleotide-count/test/nucleotide_count_tests.erl +12 -11
  73. data/tracks/erlang/exercises/pangram/README.md +60 -0
  74. data/tracks/erlang/exercises/{accumulate → pangram}/include/exercism.hrl +0 -0
  75. data/tracks/erlang/exercises/{beer-song/rebar.conf → pangram/rebar.config} +0 -0
  76. data/tracks/erlang/exercises/pangram/src/example.erl +11 -0
  77. data/tracks/erlang/exercises/pangram/src/pangram.app.src +9 -0
  78. data/tracks/erlang/exercises/pangram/src/pangram.erl +8 -0
  79. data/tracks/erlang/exercises/pangram/test/pangram_tests.erl +38 -0
  80. data/tracks/erlang/exercises/parallel-letter-frequency/rebar.config +1 -1
  81. data/tracks/erlang/exercises/parallel-letter-frequency/test/parallel_letter_frequency_tests.erl +7 -6
  82. data/tracks/erlang/exercises/phone-number/rebar.config +1 -1
  83. data/tracks/erlang/exercises/phone-number/test/phone_number_tests.erl +13 -12
  84. data/tracks/erlang/exercises/rna-transcription/rebar.config +1 -1
  85. data/tracks/erlang/exercises/rna-transcription/test/rna_transcription_tests.erl +13 -11
  86. data/tracks/erlang/exercises/robot-simulator/rebar.config +1 -1
  87. data/tracks/erlang/exercises/robot-simulator/test/robot_simulator_tests.erl +70 -69
  88. data/tracks/erlang/exercises/roman-numerals/rebar.config +1 -1
  89. data/tracks/erlang/exercises/roman-numerals/test/roman_numerals_tests.erl +6 -5
  90. data/tracks/erlang/exercises/rotational-cipher/rebar.config +1 -8
  91. data/tracks/erlang/exercises/rotational-cipher/test/rotational_cipher_tests.erl +29 -27
  92. data/tracks/erlang/exercises/scrabble-score/rebar.config +1 -1
  93. data/tracks/erlang/exercises/scrabble-score/test/scrabble_score_tests.erl +6 -5
  94. data/tracks/erlang/exercises/series/rebar.config +1 -1
  95. data/tracks/erlang/exercises/series/test/series_tests.erl +6 -5
  96. data/tracks/erlang/exercises/sieve/rebar.config +1 -1
  97. data/tracks/erlang/exercises/sieve/test/sieve_tests.erl +10 -8
  98. data/tracks/erlang/exercises/space-age/rebar.config +1 -1
  99. data/tracks/erlang/exercises/space-age/test/space_age_tests.erl +20 -19
  100. data/tracks/erlang/exercises/spiral-matrix/rebar.config +1 -1
  101. data/tracks/erlang/exercises/spiral-matrix/test/spiral_matrix_tests.erl +12 -10
  102. data/tracks/erlang/exercises/strain/rebar.config +1 -1
  103. data/tracks/erlang/exercises/strain/test/strain_tests.erl +17 -16
  104. data/tracks/erlang/exercises/sum-of-multiples/rebar.config +1 -1
  105. data/tracks/erlang/exercises/sum-of-multiples/test/sum_of_multiples_tests.erl +16 -15
  106. data/tracks/erlang/exercises/triangle/rebar.config +1 -1
  107. data/tracks/erlang/exercises/triangle/test/triangle_tests.erl +20 -19
  108. data/tracks/erlang/exercises/two-fer/rebar.config +1 -1
  109. data/tracks/erlang/exercises/two-fer/test/two_fer_tests.erl +8 -7
  110. data/tracks/erlang/exercises/word-count/rebar.config +1 -1
  111. data/tracks/erlang/exercises/word-count/test/word_count_tests.erl +6 -5
  112. data/tracks/erlang/exercises/zipper/rebar.config +1 -1
  113. data/tracks/erlang/exercises/zipper/test/zipper_tests.erl +47 -46
  114. data/tracks/erlang/testgen/src/tgen.erl +8 -6
  115. data/tracks/erlang/testgen/src/tgen_bob.erl +1 -1
  116. data/tracks/erlang/testgen/src/tgen_collatz-conjecture.erl +2 -2
  117. data/tracks/erlang/testgen/src/tgen_complex-numbers.erl +11 -11
  118. data/tracks/erlang/testgen/src/tgen_custom-set.erl +14 -14
  119. data/tracks/erlang/testgen/src/tgen_hamming.erl +2 -2
  120. data/tracks/erlang/testgen/src/tgen_hello-world.erl +1 -1
  121. data/tracks/erlang/testgen/src/tgen_leap.erl +1 -1
  122. data/tracks/erlang/testgen/src/tgen_rna-transcription.erl +2 -2
  123. data/tracks/erlang/testgen/src/tgs.erl +6 -0
  124. data/tracks/fsharp/exercises/beer-song/BeerSong.fs +1 -5
  125. data/tracks/fsharp/exercises/beer-song/BeerSongTest.fs +342 -20
  126. data/tracks/fsharp/exercises/beer-song/Example.fs +16 -10
  127. data/tracks/fsharp/exercises/food-chain/Example.fs +1 -1
  128. data/tracks/fsharp/exercises/food-chain/FoodChain.fs +1 -3
  129. data/tracks/fsharp/exercises/food-chain/FoodChainTest.fs +11 -11
  130. data/tracks/fsharp/exercises/house/Example.fs +1 -1
  131. data/tracks/fsharp/exercises/house/House.fs +1 -3
  132. data/tracks/fsharp/exercises/house/HouseTest.fs +202 -202
  133. data/tracks/fsharp/exercises/proverb/Example.fs +9 -9
  134. data/tracks/fsharp/exercises/proverb/Proverb.fs +1 -3
  135. data/tracks/fsharp/exercises/proverb/ProverbTest.fs +50 -21
  136. data/tracks/fsharp/exercises/twelve-days/Example.fs +4 -4
  137. data/tracks/fsharp/exercises/twelve-days/TwelveDays.fs +2 -6
  138. data/tracks/fsharp/exercises/twelve-days/TwelveDaysTest.fs +81 -57
  139. data/tracks/fsharp/generators/Generators.fs +39 -15
  140. data/tracks/go/bin/run-generators +5 -1
  141. data/tracks/go/config.json +14 -2
  142. data/tracks/go/exercises/accumulate/example.go +2 -1
  143. data/tracks/go/exercises/zebra-puzzle/.meta/hints.md +24 -0
  144. data/tracks/go/exercises/zebra-puzzle/README.md +76 -0
  145. data/tracks/go/exercises/zebra-puzzle/example.go +256 -0
  146. data/tracks/go/exercises/zebra-puzzle/zebra_puzzle_test.go +18 -0
  147. data/tracks/haskell/exercises/forth/package.yaml +1 -1
  148. data/tracks/haskell/exercises/forth/test/Tests.hs +1 -4
  149. data/tracks/haskell/exercises/pascals-triangle/package.yaml +1 -1
  150. data/tracks/haskell/exercises/pascals-triangle/test/Tests.hs +22 -1
  151. data/tracks/java/POLICIES.md +3 -3
  152. data/tracks/java/config.json +21 -2
  153. data/tracks/java/exercises/atbash-cipher/.meta/src/reference/java/Atbash.java +12 -12
  154. data/tracks/java/exercises/protein-translation/.meta/src/reference/java/ProteinTranslator.java +47 -0
  155. data/tracks/java/exercises/protein-translation/.meta/version +1 -0
  156. data/tracks/java/exercises/protein-translation/README.md +58 -0
  157. data/tracks/java/exercises/protein-translation/build.gradle +18 -0
  158. data/tracks/java/exercises/protein-translation/src/main/java/ProteinTranslator.java +8 -0
  159. data/tracks/java/exercises/protein-translation/src/test/java/ProteinTranslatorTest.java +179 -0
  160. data/tracks/java/exercises/settings.gradle +1 -0
  161. data/tracks/javascript/.eslintignore +2 -2
  162. data/tracks/javascript/exercises/accumulate/example.js +1 -2
  163. data/tracks/javascript/exercises/grains/example.js +6 -3
  164. data/tracks/kotlin/exercises/beer-song/.meta/src/reference/kotlin/BeerSong.kt +3 -3
  165. data/tracks/kotlin/exercises/beer-song/.meta/version +1 -1
  166. data/tracks/kotlin/exercises/beer-song/README.md +1 -1
  167. data/tracks/kotlin/exercises/beer-song/src/test/kotlin/BeerSongTest.kt +6 -6
  168. data/tracks/kotlin/exercises/forth/.meta/version +1 -1
  169. data/tracks/kotlin/exercises/forth/src/test/kotlin/ForthEvaluatorTest.kt +0 -7
  170. data/tracks/kotlin/exercises/meetup/README.md +16 -12
  171. data/tracks/kotlin/exercises/nth-prime/.meta/src/reference/kotlin/Prime.kt +7 -2
  172. data/tracks/kotlin/exercises/nth-prime/.meta/version +1 -1
  173. data/tracks/kotlin/exercises/nth-prime/src/test/kotlin/PrimeTest.kt +10 -1
  174. data/tracks/kotlin/exercises/nucleotide-count/README.md +2 -2
  175. data/tracks/kotlin/exercises/pascals-triangle/.meta/src/reference/kotlin/PascalsTriangle.kt +1 -1
  176. data/tracks/kotlin/exercises/pascals-triangle/.meta/version +1 -1
  177. data/tracks/kotlin/exercises/pascals-triangle/src/test/kotlin/PascalsTriangleTest.kt +58 -1
  178. data/tracks/kotlin/exercises/sum-of-multiples/README.md +3 -3
  179. data/tracks/ocaml/exercises/forth/test.ml +1 -3
  180. data/tracks/ocaml/exercises/rectangles/example.ml +11 -11
  181. data/tracks/php/exercises/bob/example.php +2 -2
  182. data/tracks/purescript/config.json +3 -3
  183. data/tracks/python/config.json +34 -22
  184. data/tracks/python/exercises/alphametics/example.py +90 -34
  185. data/tracks/python/exercises/ocr-numbers/example.py +18 -21
  186. data/tracks/python/exercises/ocr-numbers/ocr_numbers.py +1 -5
  187. data/tracks/python/exercises/ocr-numbers/ocr_numbers_test.py +124 -106
  188. data/tracks/python/exercises/simple-linked-list/README.md +49 -0
  189. data/tracks/python/exercises/simple-linked-list/example.py +67 -0
  190. data/tracks/python/exercises/simple-linked-list/hints.md +10 -0
  191. data/tracks/python/exercises/simple-linked-list/simple_linked_list.py +33 -0
  192. data/tracks/python/exercises/simple-linked-list/simple_linked_list_test.py +112 -0
  193. data/tracks/rust/README.md +2 -0
  194. data/tracks/rust/bin/init_exercise.py +586 -0
  195. data/tracks/rust/config.json +20 -10
  196. data/tracks/rust/exercises/book-store/.gitignore +3 -0
  197. data/tracks/rust/exercises/book-store/Cargo-example.toml +7 -0
  198. data/tracks/rust/exercises/book-store/Cargo.toml +6 -0
  199. data/tracks/rust/exercises/book-store/README.md +107 -0
  200. data/tracks/rust/exercises/book-store/example.rs +187 -0
  201. data/tracks/rust/exercises/book-store/src/lib.rs +3 -0
  202. data/tracks/rust/exercises/book-store/tests/book-store.rs +130 -0
  203. data/tracks/sml/config.json +8 -8
  204. data/tracks/typescript/config.json +6 -6
  205. metadata +43 -46
  206. data/tracks/erlang/exercises/all-your-base/include/exercism.hrl +0 -11
  207. data/tracks/erlang/exercises/allergies/include/exercism.hrl +0 -11
  208. data/tracks/erlang/exercises/anagram/include/exercism.hrl +0 -11
  209. data/tracks/erlang/exercises/atbash-cipher/include/exercism.hrl +0 -11
  210. data/tracks/erlang/exercises/bank-account/include/exercism.hrl +0 -11
  211. data/tracks/erlang/exercises/beer-song/include/exercism.hrl +0 -11
  212. data/tracks/erlang/exercises/bob/include/exercism.hrl +0 -11
  213. data/tracks/erlang/exercises/circular-buffer/include/exercism.hrl +0 -11
  214. data/tracks/erlang/exercises/clock/include/exercism.hrl +0 -11
  215. data/tracks/erlang/exercises/collatz-conjecture/include/exercism.hrl +0 -11
  216. data/tracks/erlang/exercises/complex-numbers/include/exercism.hrl +0 -11
  217. data/tracks/erlang/exercises/custom-set/include/exercism.hrl +0 -11
  218. data/tracks/erlang/exercises/difference-of-squares/include/exercism.hrl +0 -11
  219. data/tracks/erlang/exercises/etl/include/exercism.hrl +0 -11
  220. data/tracks/erlang/exercises/gigasecond/include/exercism.hrl +0 -11
  221. data/tracks/erlang/exercises/grade-school/include/exercism.hrl +0 -11
  222. data/tracks/erlang/exercises/grains/include/exercism.hrl +0 -11
  223. data/tracks/erlang/exercises/hamming/include/exercism.hrl +0 -11
  224. data/tracks/erlang/exercises/hello-world/include/exercism.hrl +0 -11
  225. data/tracks/erlang/exercises/isogram/include/exercism.hrl +0 -11
  226. data/tracks/erlang/exercises/largest-series-product/include/exercism.hrl +0 -11
  227. data/tracks/erlang/exercises/leap/include/exercism.hrl +0 -11
  228. data/tracks/erlang/exercises/luhn/include/exercism.hrl +0 -11
  229. data/tracks/erlang/exercises/meetup/include/exercism.hrl +0 -11
  230. data/tracks/erlang/exercises/nucleotide-count/include/exercism.hrl +0 -11
  231. data/tracks/erlang/exercises/parallel-letter-frequency/include/exercism.hrl +0 -11
  232. data/tracks/erlang/exercises/phone-number/include/exercism.hrl +0 -11
  233. data/tracks/erlang/exercises/rna-transcription/include/exercism.hrl +0 -11
  234. data/tracks/erlang/exercises/robot-simulator/include/exercism.hrl +0 -11
  235. data/tracks/erlang/exercises/roman-numerals/include/exercism.hrl +0 -11
  236. data/tracks/erlang/exercises/rotational-cipher/include/exercism.hrl +0 -11
  237. data/tracks/erlang/exercises/scrabble-score/include/exercism.hrl +0 -11
  238. data/tracks/erlang/exercises/series/include/exercism.hrl +0 -11
  239. data/tracks/erlang/exercises/sieve/include/exercism.hrl +0 -11
  240. data/tracks/erlang/exercises/space-age/include/exercism.hrl +0 -11
  241. data/tracks/erlang/exercises/spiral-matrix/include/exercism.hrl +0 -11
  242. data/tracks/erlang/exercises/strain/include/exercism.hrl +0 -11
  243. data/tracks/erlang/exercises/sum-of-multiples/include/exercism.hrl +0 -11
  244. data/tracks/erlang/exercises/triangle/include/exercism.hrl +0 -11
  245. data/tracks/erlang/exercises/two-fer/include/exercism.hrl +0 -11
  246. data/tracks/erlang/exercises/word-count/include/exercism.hrl +0 -11
  247. data/tracks/erlang/exercises/zipper/include/exercism.hrl +0 -11
@@ -1,15 +1,21 @@
1
1
  module BeerSong
2
2
 
3
- let verse n =
3
+ let private verse n =
4
4
  match n with
5
- | 0 -> "No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
6
- | 1 -> "1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n"
7
- | 2 -> "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n"
8
- | _ -> sprintf "%d bottles of beer on the wall, %d bottles of beer.\nTake one down and pass it around, %d bottles of beer on the wall.\n" n n (n-1)
5
+ | 0 ->
6
+ [ "No more bottles of beer on the wall, no more bottles of beer.";
7
+ "Go to the store and buy some more, 99 bottles of beer on the wall." ]
8
+ | 1 ->
9
+ [ "1 bottle of beer on the wall, 1 bottle of beer.";
10
+ "Take it down and pass it around, no more bottles of beer on the wall." ]
11
+ | 2 ->
12
+ [ "2 bottles of beer on the wall, 2 bottles of beer.";
13
+ "Take one down and pass it around, 1 bottle of beer on the wall." ]
14
+ | _ ->
15
+ [ sprintf "%d bottles of beer on the wall, %d bottles of beer." n n;
16
+ sprintf "Take one down and pass it around, %d bottles of beer on the wall." (n-1) ]
9
17
 
10
- let verses stop start =
11
- [stop .. -1 .. start]
18
+ let recite startBottles takeDown =
19
+ [startBottles .. -1 .. (startBottles - takeDown + 1)]
12
20
  |> List.map verse
13
- |> String.concat "\n"
14
-
15
- let sing = verses 99 0
21
+ |> List.reduce (fun x y -> x @ "" :: y)
@@ -38,7 +38,7 @@ let verseEnd number =
38
38
 
39
39
  let verse number = verseBegin number @ verseEnd number
40
40
 
41
- let verses start stop =
41
+ let recite start stop =
42
42
  [start .. stop]
43
43
  |> List.map verse
44
44
  |> List.reduce (fun x y -> x @ "" :: y)
@@ -1,5 +1,3 @@
1
1
  module FoodChain
2
2
 
3
- let verse number: string list = failwith "You need to implement this function."
4
-
5
- let verses start stop: string list = failwith "You need to implement this function."
3
+ let recite start stop: string list = failwith "You need to implement this function."
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.0.0 of the canonical data.
1
+ // This file was auto-generated based on version 2.0.0 of the canonical data.
2
2
 
3
3
  module FoodChainTest
4
4
 
@@ -12,7 +12,7 @@ let ``Fly`` () =
12
12
  let expected =
13
13
  [ "I know an old lady who swallowed a fly.";
14
14
  "I don't know why she swallowed the fly. Perhaps she'll die." ]
15
- verse 1 |> should equal expected
15
+ recite 1 1 |> should equal expected
16
16
 
17
17
  [<Fact(Skip = "Remove to run test")>]
18
18
  let ``Spider`` () =
@@ -21,7 +21,7 @@ let ``Spider`` () =
21
21
  "It wriggled and jiggled and tickled inside her.";
22
22
  "She swallowed the spider to catch the fly.";
23
23
  "I don't know why she swallowed the fly. Perhaps she'll die." ]
24
- verse 2 |> should equal expected
24
+ recite 2 2 |> should equal expected
25
25
 
26
26
  [<Fact(Skip = "Remove to run test")>]
27
27
  let ``Bird`` () =
@@ -31,7 +31,7 @@ let ``Bird`` () =
31
31
  "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
32
32
  "She swallowed the spider to catch the fly.";
33
33
  "I don't know why she swallowed the fly. Perhaps she'll die." ]
34
- verse 3 |> should equal expected
34
+ recite 3 3 |> should equal expected
35
35
 
36
36
  [<Fact(Skip = "Remove to run test")>]
37
37
  let ``Cat`` () =
@@ -42,7 +42,7 @@ let ``Cat`` () =
42
42
  "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
43
43
  "She swallowed the spider to catch the fly.";
44
44
  "I don't know why she swallowed the fly. Perhaps she'll die." ]
45
- verse 4 |> should equal expected
45
+ recite 4 4 |> should equal expected
46
46
 
47
47
  [<Fact(Skip = "Remove to run test")>]
48
48
  let ``Dog`` () =
@@ -54,7 +54,7 @@ let ``Dog`` () =
54
54
  "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
55
55
  "She swallowed the spider to catch the fly.";
56
56
  "I don't know why she swallowed the fly. Perhaps she'll die." ]
57
- verse 5 |> should equal expected
57
+ recite 5 5 |> should equal expected
58
58
 
59
59
  [<Fact(Skip = "Remove to run test")>]
60
60
  let ``Goat`` () =
@@ -67,7 +67,7 @@ let ``Goat`` () =
67
67
  "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
68
68
  "She swallowed the spider to catch the fly.";
69
69
  "I don't know why she swallowed the fly. Perhaps she'll die." ]
70
- verse 6 |> should equal expected
70
+ recite 6 6 |> should equal expected
71
71
 
72
72
  [<Fact(Skip = "Remove to run test")>]
73
73
  let ``Cow`` () =
@@ -81,14 +81,14 @@ let ``Cow`` () =
81
81
  "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
82
82
  "She swallowed the spider to catch the fly.";
83
83
  "I don't know why she swallowed the fly. Perhaps she'll die." ]
84
- verse 7 |> should equal expected
84
+ recite 7 7 |> should equal expected
85
85
 
86
86
  [<Fact(Skip = "Remove to run test")>]
87
87
  let ``Horse`` () =
88
88
  let expected =
89
89
  [ "I know an old lady who swallowed a horse.";
90
90
  "She's dead, of course!" ]
91
- verse 8 |> should equal expected
91
+ recite 8 8 |> should equal expected
92
92
 
93
93
  [<Fact(Skip = "Remove to run test")>]
94
94
  let ``Multiple verses`` () =
@@ -106,7 +106,7 @@ let ``Multiple verses`` () =
106
106
  "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
107
107
  "She swallowed the spider to catch the fly.";
108
108
  "I don't know why she swallowed the fly. Perhaps she'll die." ]
109
- verses 1 3 |> should equal expected
109
+ recite 1 3 |> should equal expected
110
110
 
111
111
  [<Fact(Skip = "Remove to run test")>]
112
112
  let ``Full song`` () =
@@ -161,5 +161,5 @@ let ``Full song`` () =
161
161
  "";
162
162
  "I know an old lady who swallowed a horse.";
163
163
  "She's dead, of course!" ]
164
- verses 1 8 |> should equal expected
164
+ recite 1 8 |> should equal expected
165
165
 
@@ -28,7 +28,7 @@ let verse number =
28
28
  [number .. -1 .. 1]
29
29
  |> List.map lineForBlock
30
30
 
31
- let verses startVerse endVerse =
31
+ let recite startVerse endVerse =
32
32
  [startVerse..endVerse]
33
33
  |> List.map verse
34
34
  |> List.reduce (fun x y -> x @ "" :: y)
@@ -1,5 +1,3 @@
1
1
  module House
2
2
 
3
- let verse number: string list = failwith "You need to implement this function."
4
-
5
- let verses startVerse endVerse: string list = failwith "You need to implement this function."
3
+ let recite startVerse endVerse: string list = failwith "You need to implement this function."
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.0.0 of the canonical data.
1
+ // This file was auto-generated based on version 2.0.0 of the canonical data.
2
2
 
3
3
  module HouseTest
4
4
 
@@ -10,270 +10,270 @@ open House
10
10
  [<Fact>]
11
11
  let ``Verse one - the house that jack built`` () =
12
12
  let expected = ["This is the house that Jack built."]
13
- verse 1 |> should equal expected
13
+ recite 1 1 |> should equal expected
14
14
 
15
15
  [<Fact(Skip = "Remove to run test")>]
16
16
  let ``Verse two - the malt that lay`` () =
17
17
  let expected =
18
- [ "This is the malt"
18
+ [ "This is the malt";
19
19
  "that lay in the house that Jack built." ]
20
- verse 2 |> should equal expected
20
+ recite 2 2 |> should equal expected
21
21
 
22
22
  [<Fact(Skip = "Remove to run test")>]
23
23
  let ``Verse three - the rat that ate`` () =
24
24
  let expected =
25
- [ "This is the rat"
26
- "that ate the malt"
25
+ [ "This is the rat";
26
+ "that ate the malt";
27
27
  "that lay in the house that Jack built." ]
28
- verse 3 |> should equal expected
28
+ recite 3 3 |> should equal expected
29
29
 
30
30
  [<Fact(Skip = "Remove to run test")>]
31
31
  let ``Verse four - the cat that killed`` () =
32
32
  let expected =
33
- [ "This is the cat"
34
- "that killed the rat"
35
- "that ate the malt"
33
+ [ "This is the cat";
34
+ "that killed the rat";
35
+ "that ate the malt";
36
36
  "that lay in the house that Jack built." ]
37
- verse 4 |> should equal expected
37
+ recite 4 4 |> should equal expected
38
38
 
39
39
  [<Fact(Skip = "Remove to run test")>]
40
40
  let ``Verse five - the dog that worried`` () =
41
41
  let expected =
42
- [ "This is the dog"
43
- "that worried the cat"
44
- "that killed the rat"
45
- "that ate the malt"
42
+ [ "This is the dog";
43
+ "that worried the cat";
44
+ "that killed the rat";
45
+ "that ate the malt";
46
46
  "that lay in the house that Jack built." ]
47
- verse 5 |> should equal expected
47
+ recite 5 5 |> should equal expected
48
48
 
49
49
  [<Fact(Skip = "Remove to run test")>]
50
50
  let ``Verse six - the cow with the crumpled horn`` () =
51
51
  let expected =
52
- [ "This is the cow with the crumpled horn"
53
- "that tossed the dog"
54
- "that worried the cat"
55
- "that killed the rat"
56
- "that ate the malt"
52
+ [ "This is the cow with the crumpled horn";
53
+ "that tossed the dog";
54
+ "that worried the cat";
55
+ "that killed the rat";
56
+ "that ate the malt";
57
57
  "that lay in the house that Jack built." ]
58
- verse 6 |> should equal expected
58
+ recite 6 6 |> should equal expected
59
59
 
60
60
  [<Fact(Skip = "Remove to run test")>]
61
61
  let ``Verse seven - the maiden all forlorn`` () =
62
62
  let expected =
63
- [ "This is the maiden all forlorn"
64
- "that milked the cow with the crumpled horn"
65
- "that tossed the dog"
66
- "that worried the cat"
67
- "that killed the rat"
68
- "that ate the malt"
63
+ [ "This is the maiden all forlorn";
64
+ "that milked the cow with the crumpled horn";
65
+ "that tossed the dog";
66
+ "that worried the cat";
67
+ "that killed the rat";
68
+ "that ate the malt";
69
69
  "that lay in the house that Jack built." ]
70
- verse 7 |> should equal expected
70
+ recite 7 7 |> should equal expected
71
71
 
72
72
  [<Fact(Skip = "Remove to run test")>]
73
73
  let ``Verse eight - the man all tattered and torn`` () =
74
74
  let expected =
75
- [ "This is the man all tattered and torn"
76
- "that kissed the maiden all forlorn"
77
- "that milked the cow with the crumpled horn"
78
- "that tossed the dog"
79
- "that worried the cat"
80
- "that killed the rat"
81
- "that ate the malt"
75
+ [ "This is the man all tattered and torn";
76
+ "that kissed the maiden all forlorn";
77
+ "that milked the cow with the crumpled horn";
78
+ "that tossed the dog";
79
+ "that worried the cat";
80
+ "that killed the rat";
81
+ "that ate the malt";
82
82
  "that lay in the house that Jack built." ]
83
- verse 8 |> should equal expected
83
+ recite 8 8 |> should equal expected
84
84
 
85
85
  [<Fact(Skip = "Remove to run test")>]
86
86
  let ``Verse nine - the priest all shaven and shorn`` () =
87
87
  let expected =
88
- [ "This is the priest all shaven and shorn"
89
- "that married the man all tattered and torn"
90
- "that kissed the maiden all forlorn"
91
- "that milked the cow with the crumpled horn"
92
- "that tossed the dog"
93
- "that worried the cat"
94
- "that killed the rat"
95
- "that ate the malt"
88
+ [ "This is the priest all shaven and shorn";
89
+ "that married the man all tattered and torn";
90
+ "that kissed the maiden all forlorn";
91
+ "that milked the cow with the crumpled horn";
92
+ "that tossed the dog";
93
+ "that worried the cat";
94
+ "that killed the rat";
95
+ "that ate the malt";
96
96
  "that lay in the house that Jack built." ]
97
- verse 9 |> should equal expected
97
+ recite 9 9 |> should equal expected
98
98
 
99
99
  [<Fact(Skip = "Remove to run test")>]
100
100
  let ``Verse 10 - the rooster that crowed in the morn`` () =
101
101
  let expected =
102
- [ "This is the rooster that crowed in the morn"
103
- "that woke the priest all shaven and shorn"
104
- "that married the man all tattered and torn"
105
- "that kissed the maiden all forlorn"
106
- "that milked the cow with the crumpled horn"
107
- "that tossed the dog"
108
- "that worried the cat"
109
- "that killed the rat"
110
- "that ate the malt"
102
+ [ "This is the rooster that crowed in the morn";
103
+ "that woke the priest all shaven and shorn";
104
+ "that married the man all tattered and torn";
105
+ "that kissed the maiden all forlorn";
106
+ "that milked the cow with the crumpled horn";
107
+ "that tossed the dog";
108
+ "that worried the cat";
109
+ "that killed the rat";
110
+ "that ate the malt";
111
111
  "that lay in the house that Jack built." ]
112
- verse 10 |> should equal expected
112
+ recite 10 10 |> should equal expected
113
113
 
114
114
  [<Fact(Skip = "Remove to run test")>]
115
115
  let ``Verse 11 - the farmer sowing his corn`` () =
116
116
  let expected =
117
- [ "This is the farmer sowing his corn"
118
- "that kept the rooster that crowed in the morn"
119
- "that woke the priest all shaven and shorn"
120
- "that married the man all tattered and torn"
121
- "that kissed the maiden all forlorn"
122
- "that milked the cow with the crumpled horn"
123
- "that tossed the dog"
124
- "that worried the cat"
125
- "that killed the rat"
126
- "that ate the malt"
117
+ [ "This is the farmer sowing his corn";
118
+ "that kept the rooster that crowed in the morn";
119
+ "that woke the priest all shaven and shorn";
120
+ "that married the man all tattered and torn";
121
+ "that kissed the maiden all forlorn";
122
+ "that milked the cow with the crumpled horn";
123
+ "that tossed the dog";
124
+ "that worried the cat";
125
+ "that killed the rat";
126
+ "that ate the malt";
127
127
  "that lay in the house that Jack built." ]
128
- verse 11 |> should equal expected
128
+ recite 11 11 |> should equal expected
129
129
 
130
130
  [<Fact(Skip = "Remove to run test")>]
131
131
  let ``Verse 12 - the horse and the hound and the horn`` () =
132
132
  let expected =
133
- [ "This is the horse and the hound and the horn"
134
- "that belonged to the farmer sowing his corn"
135
- "that kept the rooster that crowed in the morn"
136
- "that woke the priest all shaven and shorn"
137
- "that married the man all tattered and torn"
138
- "that kissed the maiden all forlorn"
139
- "that milked the cow with the crumpled horn"
140
- "that tossed the dog"
141
- "that worried the cat"
142
- "that killed the rat"
143
- "that ate the malt"
133
+ [ "This is the horse and the hound and the horn";
134
+ "that belonged to the farmer sowing his corn";
135
+ "that kept the rooster that crowed in the morn";
136
+ "that woke the priest all shaven and shorn";
137
+ "that married the man all tattered and torn";
138
+ "that kissed the maiden all forlorn";
139
+ "that milked the cow with the crumpled horn";
140
+ "that tossed the dog";
141
+ "that worried the cat";
142
+ "that killed the rat";
143
+ "that ate the malt";
144
144
  "that lay in the house that Jack built." ]
145
- verse 12 |> should equal expected
145
+ recite 12 12 |> should equal expected
146
146
 
147
147
  [<Fact(Skip = "Remove to run test")>]
148
148
  let ``Multiple verses`` () =
149
149
  let expected =
150
- [ "This is the cat"
151
- "that killed the rat"
152
- "that ate the malt"
153
- "that lay in the house that Jack built."
154
- ""
155
- "This is the dog"
156
- "that worried the cat"
157
- "that killed the rat"
158
- "that ate the malt"
159
- "that lay in the house that Jack built."
160
- ""
161
- "This is the cow with the crumpled horn"
162
- "that tossed the dog"
163
- "that worried the cat"
164
- "that killed the rat"
165
- "that ate the malt"
166
- "that lay in the house that Jack built."
167
- ""
168
- "This is the maiden all forlorn"
169
- "that milked the cow with the crumpled horn"
170
- "that tossed the dog"
171
- "that worried the cat"
172
- "that killed the rat"
173
- "that ate the malt"
174
- "that lay in the house that Jack built."
175
- ""
176
- "This is the man all tattered and torn"
177
- "that kissed the maiden all forlorn"
178
- "that milked the cow with the crumpled horn"
179
- "that tossed the dog"
180
- "that worried the cat"
181
- "that killed the rat"
182
- "that ate the malt"
150
+ [ "This is the cat";
151
+ "that killed the rat";
152
+ "that ate the malt";
153
+ "that lay in the house that Jack built.";
154
+ "";
155
+ "This is the dog";
156
+ "that worried the cat";
157
+ "that killed the rat";
158
+ "that ate the malt";
159
+ "that lay in the house that Jack built.";
160
+ "";
161
+ "This is the cow with the crumpled horn";
162
+ "that tossed the dog";
163
+ "that worried the cat";
164
+ "that killed the rat";
165
+ "that ate the malt";
166
+ "that lay in the house that Jack built.";
167
+ "";
168
+ "This is the maiden all forlorn";
169
+ "that milked the cow with the crumpled horn";
170
+ "that tossed the dog";
171
+ "that worried the cat";
172
+ "that killed the rat";
173
+ "that ate the malt";
174
+ "that lay in the house that Jack built.";
175
+ "";
176
+ "This is the man all tattered and torn";
177
+ "that kissed the maiden all forlorn";
178
+ "that milked the cow with the crumpled horn";
179
+ "that tossed the dog";
180
+ "that worried the cat";
181
+ "that killed the rat";
182
+ "that ate the malt";
183
183
  "that lay in the house that Jack built." ]
184
- verses 4 8 |> should equal expected
184
+ recite 4 8 |> should equal expected
185
185
 
186
186
  [<Fact(Skip = "Remove to run test")>]
187
187
  let ``Full rhyme`` () =
188
188
  let expected =
189
- [ "This is the house that Jack built."
190
- ""
191
- "This is the malt"
192
- "that lay in the house that Jack built."
193
- ""
194
- "This is the rat"
195
- "that ate the malt"
196
- "that lay in the house that Jack built."
197
- ""
198
- "This is the cat"
199
- "that killed the rat"
200
- "that ate the malt"
201
- "that lay in the house that Jack built."
202
- ""
203
- "This is the dog"
204
- "that worried the cat"
205
- "that killed the rat"
206
- "that ate the malt"
207
- "that lay in the house that Jack built."
208
- ""
209
- "This is the cow with the crumpled horn"
210
- "that tossed the dog"
211
- "that worried the cat"
212
- "that killed the rat"
213
- "that ate the malt"
214
- "that lay in the house that Jack built."
215
- ""
216
- "This is the maiden all forlorn"
217
- "that milked the cow with the crumpled horn"
218
- "that tossed the dog"
219
- "that worried the cat"
220
- "that killed the rat"
221
- "that ate the malt"
222
- "that lay in the house that Jack built."
223
- ""
224
- "This is the man all tattered and torn"
225
- "that kissed the maiden all forlorn"
226
- "that milked the cow with the crumpled horn"
227
- "that tossed the dog"
228
- "that worried the cat"
229
- "that killed the rat"
230
- "that ate the malt"
231
- "that lay in the house that Jack built."
232
- ""
233
- "This is the priest all shaven and shorn"
234
- "that married the man all tattered and torn"
235
- "that kissed the maiden all forlorn"
236
- "that milked the cow with the crumpled horn"
237
- "that tossed the dog"
238
- "that worried the cat"
239
- "that killed the rat"
240
- "that ate the malt"
241
- "that lay in the house that Jack built."
242
- ""
243
- "This is the rooster that crowed in the morn"
244
- "that woke the priest all shaven and shorn"
245
- "that married the man all tattered and torn"
246
- "that kissed the maiden all forlorn"
247
- "that milked the cow with the crumpled horn"
248
- "that tossed the dog"
249
- "that worried the cat"
250
- "that killed the rat"
251
- "that ate the malt"
252
- "that lay in the house that Jack built."
253
- ""
254
- "This is the farmer sowing his corn"
255
- "that kept the rooster that crowed in the morn"
256
- "that woke the priest all shaven and shorn"
257
- "that married the man all tattered and torn"
258
- "that kissed the maiden all forlorn"
259
- "that milked the cow with the crumpled horn"
260
- "that tossed the dog"
261
- "that worried the cat"
262
- "that killed the rat"
263
- "that ate the malt"
264
- "that lay in the house that Jack built."
265
- ""
266
- "This is the horse and the hound and the horn"
267
- "that belonged to the farmer sowing his corn"
268
- "that kept the rooster that crowed in the morn"
269
- "that woke the priest all shaven and shorn"
270
- "that married the man all tattered and torn"
271
- "that kissed the maiden all forlorn"
272
- "that milked the cow with the crumpled horn"
273
- "that tossed the dog"
274
- "that worried the cat"
275
- "that killed the rat"
276
- "that ate the malt"
189
+ [ "This is the house that Jack built.";
190
+ "";
191
+ "This is the malt";
192
+ "that lay in the house that Jack built.";
193
+ "";
194
+ "This is the rat";
195
+ "that ate the malt";
196
+ "that lay in the house that Jack built.";
197
+ "";
198
+ "This is the cat";
199
+ "that killed the rat";
200
+ "that ate the malt";
201
+ "that lay in the house that Jack built.";
202
+ "";
203
+ "This is the dog";
204
+ "that worried the cat";
205
+ "that killed the rat";
206
+ "that ate the malt";
207
+ "that lay in the house that Jack built.";
208
+ "";
209
+ "This is the cow with the crumpled horn";
210
+ "that tossed the dog";
211
+ "that worried the cat";
212
+ "that killed the rat";
213
+ "that ate the malt";
214
+ "that lay in the house that Jack built.";
215
+ "";
216
+ "This is the maiden all forlorn";
217
+ "that milked the cow with the crumpled horn";
218
+ "that tossed the dog";
219
+ "that worried the cat";
220
+ "that killed the rat";
221
+ "that ate the malt";
222
+ "that lay in the house that Jack built.";
223
+ "";
224
+ "This is the man all tattered and torn";
225
+ "that kissed the maiden all forlorn";
226
+ "that milked the cow with the crumpled horn";
227
+ "that tossed the dog";
228
+ "that worried the cat";
229
+ "that killed the rat";
230
+ "that ate the malt";
231
+ "that lay in the house that Jack built.";
232
+ "";
233
+ "This is the priest all shaven and shorn";
234
+ "that married the man all tattered and torn";
235
+ "that kissed the maiden all forlorn";
236
+ "that milked the cow with the crumpled horn";
237
+ "that tossed the dog";
238
+ "that worried the cat";
239
+ "that killed the rat";
240
+ "that ate the malt";
241
+ "that lay in the house that Jack built.";
242
+ "";
243
+ "This is the rooster that crowed in the morn";
244
+ "that woke the priest all shaven and shorn";
245
+ "that married the man all tattered and torn";
246
+ "that kissed the maiden all forlorn";
247
+ "that milked the cow with the crumpled horn";
248
+ "that tossed the dog";
249
+ "that worried the cat";
250
+ "that killed the rat";
251
+ "that ate the malt";
252
+ "that lay in the house that Jack built.";
253
+ "";
254
+ "This is the farmer sowing his corn";
255
+ "that kept the rooster that crowed in the morn";
256
+ "that woke the priest all shaven and shorn";
257
+ "that married the man all tattered and torn";
258
+ "that kissed the maiden all forlorn";
259
+ "that milked the cow with the crumpled horn";
260
+ "that tossed the dog";
261
+ "that worried the cat";
262
+ "that killed the rat";
263
+ "that ate the malt";
264
+ "that lay in the house that Jack built.";
265
+ "";
266
+ "This is the horse and the hound and the horn";
267
+ "that belonged to the farmer sowing his corn";
268
+ "that kept the rooster that crowed in the morn";
269
+ "that woke the priest all shaven and shorn";
270
+ "that married the man all tattered and torn";
271
+ "that kissed the maiden all forlorn";
272
+ "that milked the cow with the crumpled horn";
273
+ "that tossed the dog";
274
+ "that worried the cat";
275
+ "that killed the rat";
276
+ "that ate the malt";
277
277
  "that lay in the house that Jack built." ]
278
- verses 1 12 |> should equal expected
278
+ recite 1 12 |> should equal expected
279
279