trackler 2.2.1.54 → 2.2.1.55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/dominoes/description.md +3 -3
  4. data/problem-specifications/exercises/two-fer/description.md +0 -28
  5. data/tracks/c/config.json +12 -0
  6. data/tracks/c/exercises/queen-attack/README.md +65 -0
  7. data/tracks/c/exercises/queen-attack/makefile +15 -0
  8. data/tracks/c/exercises/queen-attack/src/example.c +25 -0
  9. data/tracks/c/exercises/queen-attack/src/queen_attack.h +19 -0
  10. data/tracks/c/exercises/queen-attack/test/test_queen_attack.c +190 -0
  11. data/tracks/c/exercises/queen-attack/test/vendor/unity.c +1300 -0
  12. data/tracks/c/exercises/queen-attack/test/vendor/unity.h +274 -0
  13. data/tracks/c/exercises/queen-attack/test/vendor/unity_internals.h +701 -0
  14. data/tracks/common-lisp/exercises/acronym/README.md +1 -1
  15. data/tracks/delphi/exercises/two-fer/README.md +0 -28
  16. data/tracks/ecmascript/config.json +41 -0
  17. data/tracks/ecmascript/exercises/accumulate/package.json +5 -3
  18. data/tracks/ecmascript/exercises/acronym/package.json +5 -3
  19. data/tracks/ecmascript/exercises/all-your-base/package.json +5 -3
  20. data/tracks/ecmascript/exercises/allergies/package.json +5 -3
  21. data/tracks/ecmascript/exercises/alphametics/package.json +5 -3
  22. data/tracks/ecmascript/exercises/anagram/package.json +5 -3
  23. data/tracks/ecmascript/exercises/atbash-cipher/package.json +5 -3
  24. data/tracks/ecmascript/exercises/beer-song/package.json +5 -3
  25. data/tracks/ecmascript/exercises/binary-search-tree/package.json +5 -3
  26. data/tracks/ecmascript/exercises/binary-search/package.json +5 -3
  27. data/tracks/ecmascript/exercises/binary/package.json +5 -3
  28. data/tracks/ecmascript/exercises/bob/package.json +5 -3
  29. data/tracks/ecmascript/exercises/bowling/package.json +2 -2
  30. data/tracks/ecmascript/exercises/bracket-push/package.json +5 -3
  31. data/tracks/ecmascript/exercises/change/README.md +44 -0
  32. data/tracks/ecmascript/exercises/change/change.spec.js +80 -0
  33. data/tracks/ecmascript/exercises/change/example.js +120 -0
  34. data/tracks/ecmascript/exercises/change/package.json +69 -0
  35. data/tracks/ecmascript/exercises/circular-buffer/package.json +5 -3
  36. data/tracks/ecmascript/exercises/clock/package.json +5 -3
  37. data/tracks/ecmascript/exercises/collatz-conjecture/package.json +6 -4
  38. data/tracks/ecmascript/exercises/connect/package.json +5 -3
  39. data/tracks/ecmascript/exercises/crypto-square/package.json +5 -3
  40. data/tracks/ecmascript/exercises/custom-set/package.json +5 -3
  41. data/tracks/ecmascript/exercises/diamond/package.json +5 -3
  42. data/tracks/ecmascript/exercises/difference-of-squares/package.json +5 -3
  43. data/tracks/ecmascript/exercises/diffie-hellman/package.json +5 -3
  44. data/tracks/ecmascript/exercises/etl/package.json +5 -3
  45. data/tracks/ecmascript/exercises/flatten-array/package.json +5 -3
  46. data/tracks/ecmascript/exercises/food-chain/package.json +5 -3
  47. data/tracks/ecmascript/exercises/gigasecond/package.json +5 -3
  48. data/tracks/ecmascript/exercises/grade-school/package.json +5 -3
  49. data/tracks/ecmascript/exercises/grains/package.json +5 -3
  50. data/tracks/ecmascript/exercises/hamming/package.json +5 -3
  51. data/tracks/ecmascript/exercises/hello-world/package.json +5 -3
  52. data/tracks/ecmascript/exercises/hexadecimal/package.json +5 -3
  53. data/tracks/ecmascript/exercises/isbn-verifier/README.md +62 -0
  54. data/tracks/ecmascript/exercises/isbn-verifier/example.js +17 -0
  55. data/tracks/ecmascript/exercises/isbn-verifier/isbn-verifier.spec.js +81 -0
  56. data/tracks/ecmascript/exercises/isbn-verifier/package.json +71 -0
  57. data/tracks/ecmascript/exercises/isogram/package.json +5 -3
  58. data/tracks/ecmascript/exercises/kindergarten-garden/package.json +5 -3
  59. data/tracks/ecmascript/exercises/largest-series-product/package.json +5 -3
  60. data/tracks/ecmascript/exercises/leap/package.json +5 -3
  61. data/tracks/ecmascript/exercises/linked-list/package.json +5 -3
  62. data/tracks/ecmascript/exercises/list-ops/package.json +5 -3
  63. data/tracks/ecmascript/exercises/luhn/package.json +5 -3
  64. data/tracks/ecmascript/exercises/matrix/package.json +5 -3
  65. data/tracks/ecmascript/exercises/meetup/package.json +5 -3
  66. data/tracks/ecmascript/exercises/minesweeper/package.json +5 -3
  67. data/tracks/ecmascript/exercises/nth-prime/package.json +5 -3
  68. data/tracks/ecmascript/exercises/ocr-numbers/package.json +5 -3
  69. data/tracks/ecmascript/exercises/octal/package.json +5 -3
  70. data/tracks/ecmascript/exercises/palindrome-products/package.json +5 -3
  71. data/tracks/ecmascript/exercises/pangram/package.json +5 -3
  72. data/tracks/ecmascript/exercises/pascals-triangle/package.json +5 -3
  73. data/tracks/ecmascript/exercises/perfect-numbers/package.json +5 -3
  74. data/tracks/ecmascript/exercises/phone-number/package.json +5 -3
  75. data/tracks/ecmascript/exercises/pig-latin/package.json +5 -3
  76. data/tracks/ecmascript/exercises/prime-factors/package.json +5 -3
  77. data/tracks/ecmascript/exercises/proverb/package.json +5 -3
  78. data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +5 -3
  79. data/tracks/ecmascript/exercises/queen-attack/package.json +5 -3
  80. data/tracks/ecmascript/exercises/raindrops/package.json +5 -3
  81. data/tracks/ecmascript/exercises/rna-transcription/package.json +5 -3
  82. data/tracks/ecmascript/exercises/robot-name/package.json +5 -3
  83. data/tracks/ecmascript/exercises/robot-simulator/package.json +5 -3
  84. data/tracks/ecmascript/exercises/roman-numerals/package.json +5 -3
  85. data/tracks/ecmascript/exercises/run-length-encoding/package.json +5 -3
  86. data/tracks/ecmascript/exercises/saddle-points/package.json +5 -3
  87. data/tracks/ecmascript/exercises/say/package.json +5 -3
  88. data/tracks/ecmascript/exercises/scrabble-score/package.json +5 -3
  89. data/tracks/ecmascript/exercises/secret-handshake/package.json +5 -3
  90. data/tracks/ecmascript/exercises/series/package.json +5 -3
  91. data/tracks/ecmascript/exercises/sieve/package.json +5 -3
  92. data/tracks/ecmascript/exercises/simple-cipher/package.json +5 -3
  93. data/tracks/ecmascript/exercises/simple-linked-list/package.json +5 -3
  94. data/tracks/ecmascript/exercises/space-age/package.json +5 -3
  95. data/tracks/ecmascript/exercises/strain/package.json +5 -3
  96. data/tracks/ecmascript/exercises/sublist/package.json +5 -3
  97. data/tracks/ecmascript/exercises/sum-of-multiples/package.json +5 -3
  98. data/tracks/ecmascript/exercises/transpose/README.md +94 -0
  99. data/tracks/ecmascript/exercises/transpose/example.js +12 -0
  100. data/tracks/ecmascript/exercises/transpose/package.json +71 -0
  101. data/tracks/ecmascript/exercises/transpose/transpose.spec.js +67 -0
  102. data/tracks/ecmascript/exercises/triangle/package.json +5 -3
  103. data/tracks/ecmascript/exercises/trinary/package.json +5 -3
  104. data/tracks/ecmascript/exercises/twelve-days/package.json +5 -3
  105. data/tracks/ecmascript/exercises/two-bucket/package.json +5 -3
  106. data/tracks/ecmascript/exercises/two-fer/package.json +5 -3
  107. data/tracks/ecmascript/exercises/word-count/package.json +5 -3
  108. data/tracks/ecmascript/exercises/word-search/package.json +5 -3
  109. data/tracks/ecmascript/exercises/wordy/package.json +5 -3
  110. data/tracks/ecmascript/package-lock.json +6219 -0
  111. data/tracks/ecmascript/package.json +5 -3
  112. data/tracks/erlang/exercises/collatz-conjecture/src/collatz_conjecture.erl +3 -4
  113. data/tracks/erlang/exercises/collatz-conjecture/src/example.erl +3 -3
  114. data/tracks/erlang/exercises/collatz-conjecture/test/collatz_conjecture_tests.erl +13 -9
  115. data/tracks/erlang/exercises/hello-world/src/hello_world.erl +2 -2
  116. data/tracks/erlang/exercises/leap/src/example.erl +1 -1
  117. data/tracks/erlang/exercises/leap/src/leap.erl +3 -3
  118. data/tracks/erlang/exercises/leap/test/leap_tests.erl +9 -9
  119. data/tracks/erlang/testgen/src/testgen.erl +16 -13
  120. data/tracks/erlang/testgen/src/tgen.erl +65 -38
  121. data/tracks/erlang/testgen/src/tgen_collatz-conjecture.erl +38 -0
  122. data/tracks/erlang/testgen/src/tgen_hello-world.erl +11 -19
  123. data/tracks/erlang/testgen/src/tgen_leap.erl +31 -0
  124. data/tracks/erlang/testgen/src/tgs.erl +80 -0
  125. data/tracks/fsharp/exercises/alphametics/AlphameticsTest.fs +78 -23
  126. data/tracks/fsharp/exercises/anagram/AnagramTest.fs +66 -34
  127. data/tracks/fsharp/exercises/connect/ConnectTest.fs +81 -68
  128. data/tracks/fsharp/exercises/connect/Example.fs +9 -5
  129. data/tracks/fsharp/exercises/food-chain/Example.fs +5 -9
  130. data/tracks/fsharp/exercises/food-chain/FoodChain.fs +2 -2
  131. data/tracks/fsharp/exercises/food-chain/FoodChainTest.fs +143 -75
  132. data/tracks/fsharp/exercises/hamming/Example.fs +8 -4
  133. data/tracks/fsharp/exercises/hamming/Hamming.fs +1 -1
  134. data/tracks/fsharp/exercises/hamming/HammingTest.fs +53 -13
  135. data/tracks/fsharp/exercises/house/Example.fs +5 -6
  136. data/tracks/fsharp/exercises/house/House.fs +3 -1
  137. data/tracks/fsharp/exercises/house/HouseTest.fs +272 -96
  138. data/tracks/fsharp/exercises/meetup/Example.fs +1 -1
  139. data/tracks/fsharp/exercises/meetup/Meetup.fs +1 -1
  140. data/tracks/fsharp/exercises/meetup/MeetupTest.fs +384 -73
  141. data/tracks/fsharp/exercises/ocr-numbers/Example.fs +43 -35
  142. data/tracks/fsharp/exercises/ocr-numbers/OcrNumbersTest.fs +160 -125
  143. data/tracks/fsharp/exercises/two-fer/Example.fs +4 -2
  144. data/tracks/fsharp/exercises/two-fer/TwoFer.fs +1 -1
  145. data/tracks/fsharp/exercises/two-fer/TwoFerTest.fs +7 -4
  146. data/tracks/fsharp/generators/Common.fs +6 -2
  147. data/tracks/fsharp/generators/Exercise.fs +14 -13
  148. data/tracks/fsharp/generators/Generators.fs +145 -2
  149. data/tracks/fsharp/generators/Options.fs +4 -6
  150. data/tracks/fsharp/generators/Output.fs +2 -2
  151. data/tracks/fsharp/generators/Program.fs +4 -3
  152. data/tracks/java/exercises/saddle-points/README.md +1 -1
  153. data/tracks/java/exercises/two-fer/README.md +0 -28
  154. data/tracks/javascript/exercises/beer-song/example.js +18 -14
  155. data/tracks/kotlin/exercises/saddle-points/README.md +1 -1
  156. data/tracks/kotlin/exercises/two-fer/README.md +0 -28
  157. data/tracks/lua/config.json +12 -0
  158. data/tracks/lua/exercises/collatz-conjecture/README.md +43 -0
  159. data/tracks/lua/exercises/collatz-conjecture/collatz-conjecture_spec.lua +33 -0
  160. data/tracks/lua/exercises/collatz-conjecture/example.lua +16 -0
  161. data/tracks/python/config.json +4 -1
  162. data/tracks/python/exercises/binary-search/binary_search_test.py +2 -0
  163. data/tracks/python/exercises/change/change_test.py +2 -0
  164. data/tracks/python/exercises/circular-buffer/circular_buffer_test.py +56 -50
  165. data/tracks/python/exercises/forth/example.py +3 -1
  166. data/tracks/python/exercises/forth/forth_test.py +43 -26
  167. data/tracks/python/exercises/nth-prime/nth_prime.py +1 -1
  168. data/tracks/python/exercises/rna-transcription/README.md +5 -0
  169. data/tracks/python/exercises/rna-transcription/example.py +1 -1
  170. data/tracks/python/exercises/rna-transcription/rna_transcription_test.py +7 -4
  171. data/tracks/python/exercises/robot-simulator/robot_simulator_test.py +9 -7
  172. data/tracks/python/exercises/saddle-points/saddle_points_test.py +15 -5
  173. data/tracks/python/exercises/simple-cipher/simple_cipher.py +7 -1
  174. data/tracks/python/exercises/word-count/example.py +6 -4
  175. data/tracks/python/exercises/word-count/word_count_test.py +49 -22
  176. data/tracks/python/exercises/word-search/word_search_test.py +104 -12
  177. data/tracks/rust/.travis.yml +2 -0
  178. data/tracks/rust/README.md +5 -0
  179. data/tracks/rust/_test/check-exercises.sh +0 -6
  180. data/tracks/rust/_test/ensure-lib-src-rs-exist.sh +19 -0
  181. data/tracks/rust/_test/ensure-stubs-compile.sh +26 -0
  182. data/tracks/rust/config.json +12 -0
  183. data/tracks/rust/config/exercise-readme-insert.md +3 -2
  184. data/tracks/rust/docs/ABOUT.md +2 -2
  185. data/tracks/rust/docs/LEARNING.md +1 -1
  186. data/tracks/rust/docs/RESOURCES.md +1 -1
  187. data/tracks/rust/docs/TESTS.md +2 -2
  188. data/tracks/rust/exercises/accumulate/README.md +3 -2
  189. data/tracks/rust/exercises/acronym/README.md +3 -2
  190. data/tracks/rust/exercises/all-your-base/README.md +3 -2
  191. data/tracks/rust/exercises/allergies/README.md +3 -2
  192. data/tracks/rust/exercises/alphametics/README.md +3 -2
  193. data/tracks/rust/exercises/anagram/README.md +3 -2
  194. data/tracks/rust/exercises/atbash-cipher/README.md +3 -2
  195. data/tracks/rust/exercises/beer-song/README.md +3 -2
  196. data/tracks/rust/exercises/beer-song/src/lib.rs +2 -2
  197. data/tracks/rust/exercises/binary-search/README.md +3 -2
  198. data/tracks/rust/exercises/bob/README.md +3 -2
  199. data/tracks/rust/exercises/bob/src/lib.rs +1 -1
  200. data/tracks/rust/exercises/bowling/README.md +3 -2
  201. data/tracks/rust/exercises/bracket-push/HINTS.md +1 -1
  202. data/tracks/rust/exercises/bracket-push/README.md +4 -3
  203. data/tracks/rust/exercises/circular-buffer/README.md +3 -2
  204. data/tracks/rust/exercises/clock/README.md +3 -2
  205. data/tracks/rust/exercises/collatz-conjecture/README.md +3 -2
  206. data/tracks/rust/exercises/collatz-conjecture/src/lib.rs +1 -1
  207. data/tracks/rust/exercises/crypto-square/README.md +3 -2
  208. data/tracks/rust/exercises/custom-set/README.md +3 -2
  209. data/tracks/rust/exercises/decimal/.meta/ALLOWED_TO_NOT_COMPILE +2 -0
  210. data/tracks/rust/exercises/decimal/README.md +3 -2
  211. data/tracks/rust/exercises/difference-of-squares/README.md +3 -2
  212. data/tracks/rust/exercises/difference-of-squares/src/lib.rs +3 -3
  213. data/tracks/rust/exercises/dominoes/README.md +3 -2
  214. data/tracks/rust/exercises/etl/README.md +3 -2
  215. data/tracks/rust/exercises/forth/README.md +3 -2
  216. data/tracks/rust/exercises/forth/src/lib.rs +3 -0
  217. data/tracks/rust/exercises/gigasecond/README.md +3 -2
  218. data/tracks/rust/exercises/grade-school/README.md +3 -2
  219. data/tracks/rust/exercises/grains/README.md +3 -2
  220. data/tracks/rust/exercises/hamming/README.md +3 -2
  221. data/tracks/rust/exercises/hello-world/GETTING_STARTED.md +1 -1
  222. data/tracks/rust/exercises/hello-world/README.md +3 -2
  223. data/tracks/rust/exercises/hexadecimal/README.md +3 -2
  224. data/tracks/rust/exercises/isogram/.gitignore +8 -0
  225. data/tracks/rust/exercises/isogram/Cargo.toml +3 -0
  226. data/tracks/rust/exercises/isogram/README.md +52 -0
  227. data/tracks/rust/exercises/isogram/example.rs +12 -0
  228. data/tracks/rust/exercises/isogram/src/lib.rs +0 -0
  229. data/tracks/rust/exercises/isogram/tests/isogram.rs +72 -0
  230. data/tracks/rust/exercises/largest-series-product/README.md +3 -2
  231. data/tracks/rust/exercises/leap/README.md +3 -2
  232. data/tracks/rust/exercises/leap/src/lib.rs +1 -1
  233. data/tracks/rust/exercises/luhn-from/README.md +3 -2
  234. data/tracks/rust/exercises/luhn-trait/.meta/description.md +2 -2
  235. data/tracks/rust/exercises/luhn-trait/README.md +5 -4
  236. data/tracks/rust/exercises/luhn/README.md +3 -2
  237. data/tracks/rust/exercises/minesweeper/README.md +3 -2
  238. data/tracks/rust/exercises/nth-prime/README.md +3 -2
  239. data/tracks/rust/exercises/nucleotide-codons/README.md +3 -2
  240. data/tracks/rust/exercises/nucleotide-count/README.md +3 -2
  241. data/tracks/rust/exercises/ocr-numbers/README.md +3 -2
  242. data/tracks/rust/exercises/pangram/README.md +3 -2
  243. data/tracks/rust/exercises/parallel-letter-frequency/HINTS.md +1 -1
  244. data/tracks/rust/exercises/parallel-letter-frequency/README.md +4 -3
  245. data/tracks/rust/exercises/pascals-triangle/README.md +3 -2
  246. data/tracks/rust/exercises/perfect-numbers/README.md +3 -2
  247. data/tracks/rust/exercises/phone-number/README.md +3 -2
  248. data/tracks/rust/exercises/pig-latin/README.md +3 -2
  249. data/tracks/rust/exercises/poker/README.md +3 -2
  250. data/tracks/rust/exercises/prime-factors/README.md +3 -2
  251. data/tracks/rust/exercises/protein-translation/README.md +3 -2
  252. data/tracks/rust/exercises/proverb/README.md +3 -2
  253. data/tracks/rust/exercises/proverb/src/lib.rs +1 -1
  254. data/tracks/rust/exercises/pythagorean-triplet/README.md +3 -2
  255. data/tracks/rust/exercises/queen-attack/README.md +3 -2
  256. data/tracks/rust/exercises/raindrops/README.md +3 -2
  257. data/tracks/rust/exercises/raindrops/src/lib.rs +1 -1
  258. data/tracks/rust/exercises/react/README.md +3 -2
  259. data/tracks/rust/exercises/rectangles/README.md +3 -2
  260. data/tracks/rust/exercises/rna-transcription/README.md +3 -2
  261. data/tracks/rust/exercises/robot-name/README.md +3 -2
  262. data/tracks/rust/exercises/robot-simulator/README.md +3 -2
  263. data/tracks/rust/exercises/roman-numerals/README.md +3 -2
  264. data/tracks/rust/exercises/rotational-cipher/README.md +3 -2
  265. data/tracks/rust/exercises/run-length-encoding/README.md +3 -2
  266. data/tracks/rust/exercises/say/README.md +3 -2
  267. data/tracks/rust/exercises/scrabble-score/README.md +3 -2
  268. data/tracks/rust/exercises/sieve/README.md +3 -2
  269. data/tracks/rust/exercises/space-age/README.md +3 -2
  270. data/tracks/rust/exercises/sublist/README.md +3 -2
  271. data/tracks/rust/exercises/sum-of-multiples/README.md +3 -2
  272. data/tracks/rust/exercises/sum-of-multiples/src/lib.rs +1 -1
  273. data/tracks/rust/exercises/tournament/README.md +3 -2
  274. data/tracks/rust/exercises/triangle/HINTS.md +2 -2
  275. data/tracks/rust/exercises/triangle/README.md +5 -4
  276. data/tracks/rust/exercises/variable-length-quantity/README.md +3 -2
  277. data/tracks/rust/exercises/word-count/README.md +3 -2
  278. data/tracks/rust/exercises/wordy/README.md +3 -2
  279. metadata +38 -3
  280. data/tracks/ecmascript/yarn.lock +0 -3144
@@ -48,14 +48,18 @@ let charToColor c =
48
48
  | 'X' -> Some Black
49
49
  | _ -> None
50
50
 
51
- let mkBoard (input: string list) =
52
- let rows' = List.length input
53
- let cols' = Seq.length (List.head input)
54
- let cellColor col row = input |> List.item row |> Seq.item col |> charToColor
51
+ let normalizeRow (row: string) = row.Replace(" ", "")
52
+
53
+ let mkBoard (input: string list) =
54
+ let normalizedRows = List.map normalizeRow input
55
+
56
+ let rows' = List.length normalizedRows
57
+ let cols' = Seq.length (List.head normalizedRows)
58
+ let cellColor col row = normalizedRows |> List.item row |> Seq.item col |> charToColor
55
59
 
56
60
  Array2D.init cols' rows' cellColor
57
61
 
58
- let resultFor input =
62
+ let winner input =
59
63
  let board = mkBoard input
60
64
  if whiteWins board then Some White
61
65
  elif blackWins board then Some Black
@@ -2,8 +2,6 @@
2
2
 
3
3
  let joinBy str = List.reduce (fun x y -> x + str + y)
4
4
 
5
- let verses = 8
6
-
7
5
  let subjects =
8
6
  [("spider", "It wriggled and jiggled and tickled inside her.");
9
7
  ("bird", "How absurd to swallow a bird!");
@@ -38,11 +36,9 @@ let verseEnd number =
38
36
  |> List.skip (List.length history - number)
39
37
  |> List.take number
40
38
 
41
- let verse number =
42
- verseBegin number @ verseEnd number
43
- |> joinBy "\n"
39
+ let verse number = verseBegin number @ verseEnd number
44
40
 
45
- let song =
46
- [1 .. verses]
47
- |> List.map verse
48
- |> joinBy "\n\n"
41
+ let verses start stop =
42
+ [start .. stop]
43
+ |> List.map verse
44
+ |> List.reduce (fun x y -> x @ "" :: y)
@@ -1,5 +1,5 @@
1
1
  module FoodChain
2
2
 
3
- let verse number = failwith "You need to implement this function."
3
+ let verse number: string list = failwith "You need to implement this function."
4
4
 
5
- let song: string = failwith "You need to implement this function."
5
+ let verses start stop: string list = failwith "You need to implement this function."
@@ -1,97 +1,165 @@
1
+ // This file was auto-generated based on version 1.0.0 of the canonical data.
2
+
1
3
  module FoodChainTest
2
4
 
3
- open Xunit
4
5
  open FsUnit.Xunit
6
+ open Xunit
5
7
 
6
8
  open FoodChain
7
9
 
8
- let combine = List.reduce (fun x y -> x + "\n" + y)
9
-
10
10
  [<Fact>]
11
- let ``Verse one`` () =
12
- let expected = ["I know an old lady who swallowed a fly.";
13
- "I don't know why she swallowed the fly. Perhaps she'll die."] |> combine
14
-
11
+ let ``Fly`` () =
12
+ let expected =
13
+ [ "I know an old lady who swallowed a fly.";
14
+ "I don't know why she swallowed the fly. Perhaps she'll die." ]
15
15
  verse 1 |> should equal expected
16
16
 
17
17
  [<Fact(Skip = "Remove to run test")>]
18
- let ``Verse two`` () =
19
- let expected = ["I know an old lady who swallowed a spider.";
20
- "It wriggled and jiggled and tickled inside her.";
21
- "She swallowed the spider to catch the fly.";
22
- "I don't know why she swallowed the fly. Perhaps she'll die."] |> combine
23
-
18
+ let ``Spider`` () =
19
+ let expected =
20
+ [ "I know an old lady who swallowed a spider.";
21
+ "It wriggled and jiggled and tickled inside her.";
22
+ "She swallowed the spider to catch the fly.";
23
+ "I don't know why she swallowed the fly. Perhaps she'll die." ]
24
24
  verse 2 |> should equal expected
25
25
 
26
26
  [<Fact(Skip = "Remove to run test")>]
27
- let ``Verse four`` () =
28
- let expected = ["I know an old lady who swallowed a cat.";
29
- "Imagine that, to swallow a cat!";
30
- "She swallowed the cat to catch the bird.";
31
- "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
32
- "She swallowed the spider to catch the fly.";
33
- "I don't know why she swallowed the fly. Perhaps she'll die."] |> combine
27
+ let ``Bird`` () =
28
+ let expected =
29
+ [ "I know an old lady who swallowed a bird.";
30
+ "How absurd to swallow a bird!";
31
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
32
+ "She swallowed the spider to catch the fly.";
33
+ "I don't know why she swallowed the fly. Perhaps she'll die." ]
34
+ verse 3 |> should equal expected
34
35
 
36
+ [<Fact(Skip = "Remove to run test")>]
37
+ let ``Cat`` () =
38
+ let expected =
39
+ [ "I know an old lady who swallowed a cat.";
40
+ "Imagine that, to swallow a cat!";
41
+ "She swallowed the cat to catch the bird.";
42
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
43
+ "She swallowed the spider to catch the fly.";
44
+ "I don't know why she swallowed the fly. Perhaps she'll die." ]
35
45
  verse 4 |> should equal expected
36
46
 
37
47
  [<Fact(Skip = "Remove to run test")>]
38
- let ``Verse eight`` () =
39
- let expected = ["I know an old lady who swallowed a horse.";
40
- "She's dead, of course!"] |> combine
48
+ let ``Dog`` () =
49
+ let expected =
50
+ [ "I know an old lady who swallowed a dog.";
51
+ "What a hog, to swallow a dog!";
52
+ "She swallowed the dog to catch the cat.";
53
+ "She swallowed the cat to catch the bird.";
54
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
55
+ "She swallowed the spider to catch the fly.";
56
+ "I don't know why she swallowed the fly. Perhaps she'll die." ]
57
+ verse 5 |> should equal expected
41
58
 
59
+ [<Fact(Skip = "Remove to run test")>]
60
+ let ``Goat`` () =
61
+ let expected =
62
+ [ "I know an old lady who swallowed a goat.";
63
+ "Just opened her throat and swallowed a goat!";
64
+ "She swallowed the goat to catch the dog.";
65
+ "She swallowed the dog to catch the cat.";
66
+ "She swallowed the cat to catch the bird.";
67
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
68
+ "She swallowed the spider to catch the fly.";
69
+ "I don't know why she swallowed the fly. Perhaps she'll die." ]
70
+ verse 6 |> should equal expected
71
+
72
+ [<Fact(Skip = "Remove to run test")>]
73
+ let ``Cow`` () =
74
+ let expected =
75
+ [ "I know an old lady who swallowed a cow.";
76
+ "I don't know how she swallowed a cow!";
77
+ "She swallowed the cow to catch the goat.";
78
+ "She swallowed the goat to catch the dog.";
79
+ "She swallowed the dog to catch the cat.";
80
+ "She swallowed the cat to catch the bird.";
81
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
82
+ "She swallowed the spider to catch the fly.";
83
+ "I don't know why she swallowed the fly. Perhaps she'll die." ]
84
+ verse 7 |> should equal expected
85
+
86
+ [<Fact(Skip = "Remove to run test")>]
87
+ let ``Horse`` () =
88
+ let expected =
89
+ [ "I know an old lady who swallowed a horse.";
90
+ "She's dead, of course!" ]
42
91
  verse 8 |> should equal expected
43
92
 
44
93
  [<Fact(Skip = "Remove to run test")>]
45
- let ``Complete song`` () =
46
- let expected = ["I know an old lady who swallowed a fly.";
47
- "I don't know why she swallowed the fly. Perhaps she'll die.";
48
- "";
49
- "I know an old lady who swallowed a spider.";
50
- "It wriggled and jiggled and tickled inside her.";
51
- "She swallowed the spider to catch the fly.";
52
- "I don't know why she swallowed the fly. Perhaps she'll die.";
53
- "";
54
- "I know an old lady who swallowed a bird.";
55
- "How absurd to swallow a bird!";
56
- "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
57
- "She swallowed the spider to catch the fly.";
58
- "I don't know why she swallowed the fly. Perhaps she'll die.";
59
- "";
60
- "I know an old lady who swallowed a cat.";
61
- "Imagine that, to swallow a cat!";
62
- "She swallowed the cat to catch the bird.";
63
- "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
64
- "She swallowed the spider to catch the fly.";
65
- "I don't know why she swallowed the fly. Perhaps she'll die.";
66
- "";
67
- "I know an old lady who swallowed a dog.";
68
- "What a hog, to swallow a dog!";
69
- "She swallowed the dog to catch the cat.";
70
- "She swallowed the cat to catch the bird.";
71
- "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
72
- "She swallowed the spider to catch the fly.";
73
- "I don't know why she swallowed the fly. Perhaps she'll die.";
74
- "";
75
- "I know an old lady who swallowed a goat.";
76
- "Just opened her throat and swallowed a goat!";
77
- "She swallowed the goat to catch the dog.";
78
- "She swallowed the dog to catch the cat.";
79
- "She swallowed the cat to catch the bird.";
80
- "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
81
- "She swallowed the spider to catch the fly.";
82
- "I don't know why she swallowed the fly. Perhaps she'll die.";
83
- "";
84
- "I know an old lady who swallowed a cow.";
85
- "I don't know how she swallowed a cow!";
86
- "She swallowed the cow to catch the goat.";
87
- "She swallowed the goat to catch the dog.";
88
- "She swallowed the dog to catch the cat.";
89
- "She swallowed the cat to catch the bird.";
90
- "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
91
- "She swallowed the spider to catch the fly.";
92
- "I don't know why she swallowed the fly. Perhaps she'll die.";
93
- "";
94
- "I know an old lady who swallowed a horse.";
95
- "She's dead, of course!"] |> combine
94
+ let ``Multiple verses`` () =
95
+ let expected =
96
+ [ "I know an old lady who swallowed a fly.";
97
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
98
+ "";
99
+ "I know an old lady who swallowed a spider.";
100
+ "It wriggled and jiggled and tickled inside her.";
101
+ "She swallowed the spider to catch the fly.";
102
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
103
+ "";
104
+ "I know an old lady who swallowed a bird.";
105
+ "How absurd to swallow a bird!";
106
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
107
+ "She swallowed the spider to catch the fly.";
108
+ "I don't know why she swallowed the fly. Perhaps she'll die." ]
109
+ verses 1 3 |> should equal expected
110
+
111
+ [<Fact(Skip = "Remove to run test")>]
112
+ let ``Full song`` () =
113
+ let expected =
114
+ [ "I know an old lady who swallowed a fly.";
115
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
116
+ "";
117
+ "I know an old lady who swallowed a spider.";
118
+ "It wriggled and jiggled and tickled inside her.";
119
+ "She swallowed the spider to catch the fly.";
120
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
121
+ "";
122
+ "I know an old lady who swallowed a bird.";
123
+ "How absurd to swallow a bird!";
124
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
125
+ "She swallowed the spider to catch the fly.";
126
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
127
+ "";
128
+ "I know an old lady who swallowed a cat.";
129
+ "Imagine that, to swallow a cat!";
130
+ "She swallowed the cat to catch the bird.";
131
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
132
+ "She swallowed the spider to catch the fly.";
133
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
134
+ "";
135
+ "I know an old lady who swallowed a dog.";
136
+ "What a hog, to swallow a dog!";
137
+ "She swallowed the dog to catch the cat.";
138
+ "She swallowed the cat to catch the bird.";
139
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
140
+ "She swallowed the spider to catch the fly.";
141
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
142
+ "";
143
+ "I know an old lady who swallowed a goat.";
144
+ "Just opened her throat and swallowed a goat!";
145
+ "She swallowed the goat to catch the dog.";
146
+ "She swallowed the dog to catch the cat.";
147
+ "She swallowed the cat to catch the bird.";
148
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
149
+ "She swallowed the spider to catch the fly.";
150
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
151
+ "";
152
+ "I know an old lady who swallowed a cow.";
153
+ "I don't know how she swallowed a cow!";
154
+ "She swallowed the cow to catch the goat.";
155
+ "She swallowed the goat to catch the dog.";
156
+ "She swallowed the dog to catch the cat.";
157
+ "She swallowed the cat to catch the bird.";
158
+ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.";
159
+ "She swallowed the spider to catch the fly.";
160
+ "I don't know why she swallowed the fly. Perhaps she'll die.";
161
+ "";
162
+ "I know an old lady who swallowed a horse.";
163
+ "She's dead, of course!" ]
164
+ verses 1 8 |> should equal expected
96
165
 
97
- song |> should equal expected
@@ -1,6 +1,10 @@
1
1
  module Hamming
2
2
 
3
- let compute (strand1:string) (strand2:string) =
4
- Array.zip (strand1.ToCharArray()) (strand2.ToCharArray())
5
- |> Array.filter (fun (c1, c2) -> c1 <> c2)
6
- |> Array.length
3
+ let distance (strand1:string) (strand2:string) =
4
+ if (strand1.Length <> strand2.Length) then
5
+ None
6
+ else
7
+ Array.zip (strand1.ToCharArray()) (strand2.ToCharArray())
8
+ |> Array.filter (fun (c1, c2) -> c1 <> c2)
9
+ |> Array.length
10
+ |> Some
@@ -1,3 +1,3 @@
1
1
  module Hamming
2
2
 
3
- let compute (strand1: string) (strand2: string): int = failwith "You need to implement this function."
3
+ let distance (strand1: string) (strand2: string): int option = failwith "You need to implement this function."
@@ -1,29 +1,69 @@
1
+ // This file was auto-generated based on version 2.0.1 of the canonical data.
2
+
1
3
  module HammingTest
2
4
 
3
- open Xunit
4
5
  open FsUnit.Xunit
6
+ open Xunit
7
+
5
8
  open Hamming
6
9
 
7
10
  [<Fact>]
8
- let ``No difference between empty strands`` () =
9
- compute "" "" |> should equal 0
11
+ let ``Empty strands`` () =
12
+ distance "" "" |> should equal (Some 0)
13
+
14
+ [<Fact(Skip = "Remove to run test")>]
15
+ let ``Identical strands`` () =
16
+ distance "A" "A" |> should equal (Some 0)
17
+
18
+ [<Fact(Skip = "Remove to run test")>]
19
+ let ``Long identical strands`` () =
20
+ distance "GGACTGA" "GGACTGA" |> should equal (Some 0)
21
+
22
+ [<Fact(Skip = "Remove to run test")>]
23
+ let ``Complete distance in single nucleotide strands`` () =
24
+ distance "A" "G" |> should equal (Some 1)
25
+
26
+ [<Fact(Skip = "Remove to run test")>]
27
+ let ``Complete distance in small strands`` () =
28
+ distance "AG" "CT" |> should equal (Some 2)
10
29
 
11
30
  [<Fact(Skip = "Remove to run test")>]
12
- let ``No difference between identical strands`` () =
13
- compute "GGACTGA" "GGACTGA" |> should equal 0
31
+ let ``Small distance in small strands`` () =
32
+ distance "AT" "CT" |> should equal (Some 1)
14
33
 
15
34
  [<Fact(Skip = "Remove to run test")>]
16
- let ``Complete hamming distance in small strand`` () =
17
- compute "ACT" "GGA" |> should equal 3
35
+ let ``Small distance`` () =
36
+ distance "GGACG" "GGTCG" |> should equal (Some 1)
18
37
 
19
38
  [<Fact(Skip = "Remove to run test")>]
20
- let ``Hamming distance is off by one strand`` () =
21
- compute "GGACGGATTCTG" "AGGACGGATTCT" |> should equal 9
39
+ let ``Small distance in long strands`` () =
40
+ distance "ACCAGGG" "ACTATGG" |> should equal (Some 2)
22
41
 
23
42
  [<Fact(Skip = "Remove to run test")>]
24
- let ``Smalling hamming distance in middle somewhere`` () =
25
- compute "GGACG" "GGTCG" |> should equal 1
43
+ let ``Non-unique character in first strand`` () =
44
+ distance "AAG" "AAA" |> should equal (Some 1)
26
45
 
27
46
  [<Fact(Skip = "Remove to run test")>]
28
- let ``Larger distance`` () =
29
- compute "ACCAGGG" "ACTATGG" |> should equal 2
47
+ let ``Non-unique character in second strand`` () =
48
+ distance "AAA" "AAG" |> should equal (Some 1)
49
+
50
+ [<Fact(Skip = "Remove to run test")>]
51
+ let ``Same nucleotides in different positions`` () =
52
+ distance "TAG" "GAT" |> should equal (Some 2)
53
+
54
+ [<Fact(Skip = "Remove to run test")>]
55
+ let ``Large distance`` () =
56
+ distance "GATACA" "GCATAA" |> should equal (Some 4)
57
+
58
+ [<Fact(Skip = "Remove to run test")>]
59
+ let ``Large distance in off-by-one strand`` () =
60
+ distance "GGACGGATTCTG" "AGGACGGATTCT" |> should equal (Some 9)
61
+
62
+ [<Fact(Skip = "Remove to run test")>]
63
+ let ``Disallow first strand longer`` () =
64
+ distance "AATG" "AAA" |> should equal None
65
+
66
+ [<Fact(Skip = "Remove to run test")>]
67
+ let ``Disallow second strand longer`` () =
68
+ distance "ATA" "AGTG" |> should equal None
69
+
@@ -23,13 +23,12 @@ let line number index =
23
23
  if index = number then "This is the " + subject + ending
24
24
  else "that " + verb + " the " + subject + ending
25
25
 
26
- let block number =
26
+ let verse number =
27
27
  let lineForBlock = line number
28
28
  [number .. -1 .. 1]
29
29
  |> List.map lineForBlock
30
- |> List.reduce (fun x y -> x + "\n" + y)
31
30
 
32
- let rhyme =
33
- [1..numberOfBlocks]
34
- |> List.map block
35
- |> List.reduce (fun x y -> x + "\n\n" + y)
31
+ let verses startVerse endVerse =
32
+ [startVerse..endVerse]
33
+ |> List.map verse
34
+ |> List.reduce (fun x y -> x @ "" :: y)
@@ -1,3 +1,5 @@
1
1
  module House
2
2
 
3
- let rhyme: string = failwith "You need to implement this function."
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."
@@ -1,103 +1,279 @@
1
+ // This file was auto-generated based on version 1.0.0 of the canonical data.
2
+
1
3
  module HouseTest
2
4
 
3
- open Xunit
4
5
  open FsUnit.Xunit
6
+ open Xunit
5
7
 
6
8
  open House
7
9
 
8
- let expected =
9
- [
10
- "This is the house that Jack built.";
11
- "";
12
- "This is the malt";
13
- "that lay in the house that Jack built.";
14
- "";
15
- "This is the rat";
16
- "that ate the malt";
17
- "that lay in the house that Jack built.";
18
- "";
19
- "This is the cat";
20
- "that killed the rat";
21
- "that ate the malt";
22
- "that lay in the house that Jack built.";
23
- "";
24
- "This is the dog";
25
- "that worried the cat";
26
- "that killed the rat";
27
- "that ate the malt";
28
- "that lay in the house that Jack built.";
29
- "";
30
- "This is the cow with the crumpled horn";
31
- "that tossed the dog";
32
- "that worried the cat";
33
- "that killed the rat";
34
- "that ate the malt";
35
- "that lay in the house that Jack built.";
36
- "";
37
- "This is the maiden all forlorn";
38
- "that milked the cow with the crumpled horn";
39
- "that tossed the dog";
40
- "that worried the cat";
41
- "that killed the rat";
42
- "that ate the malt";
43
- "that lay in the house that Jack built.";
44
- "";
45
- "This is the man all tattered and torn";
46
- "that kissed the maiden all forlorn";
47
- "that milked the cow with the crumpled horn";
48
- "that tossed the dog";
49
- "that worried the cat";
50
- "that killed the rat";
51
- "that ate the malt";
52
- "that lay in the house that Jack built.";
53
- "";
54
- "This is the priest all shaven and shorn";
55
- "that married the man all tattered and torn";
56
- "that kissed the maiden all forlorn";
57
- "that milked the cow with the crumpled horn";
58
- "that tossed the dog";
59
- "that worried the cat";
60
- "that killed the rat";
61
- "that ate the malt";
62
- "that lay in the house that Jack built.";
63
- "";
64
- "This is the rooster that crowed in the morn";
65
- "that woke the priest all shaven and shorn";
66
- "that married the man all tattered and torn";
67
- "that kissed the maiden all forlorn";
68
- "that milked the cow with the crumpled horn";
69
- "that tossed the dog";
70
- "that worried the cat";
71
- "that killed the rat";
72
- "that ate the malt";
73
- "that lay in the house that Jack built.";
74
- "";
75
- "This is the farmer sowing his corn";
76
- "that kept the rooster that crowed in the morn";
77
- "that woke the priest all shaven and shorn";
78
- "that married the man all tattered and torn";
79
- "that kissed the maiden all forlorn";
80
- "that milked the cow with the crumpled horn";
81
- "that tossed the dog";
82
- "that worried the cat";
83
- "that killed the rat";
84
- "that ate the malt";
85
- "that lay in the house that Jack built.";
86
- "";
87
- "This is the horse and the hound and the horn";
88
- "that belonged to the farmer sowing his corn";
89
- "that kept the rooster that crowed in the morn";
90
- "that woke the priest all shaven and shorn";
91
- "that married the man all tattered and torn";
92
- "that kissed the maiden all forlorn";
93
- "that milked the cow with the crumpled horn";
94
- "that tossed the dog";
95
- "that worried the cat";
96
- "that killed the rat";
97
- "that ate the malt";
98
- "that lay in the house that Jack built."]
99
- |> List.reduce (fun x y -> x + "\n" + y)
100
-
101
10
  [<Fact>]
102
- let ``Rhyme is correct`` () =
103
- rhyme |> should equal expected
11
+ let ``Verse one - the house that jack built`` () =
12
+ let expected = ["This is the house that Jack built."]
13
+ verse 1 |> should equal expected
14
+
15
+ [<Fact(Skip = "Remove to run test")>]
16
+ let ``Verse two - the malt that lay`` () =
17
+ let expected =
18
+ [ "This is the malt"
19
+ "that lay in the house that Jack built." ]
20
+ verse 2 |> should equal expected
21
+
22
+ [<Fact(Skip = "Remove to run test")>]
23
+ let ``Verse three - the rat that ate`` () =
24
+ let expected =
25
+ [ "This is the rat"
26
+ "that ate the malt"
27
+ "that lay in the house that Jack built." ]
28
+ verse 3 |> should equal expected
29
+
30
+ [<Fact(Skip = "Remove to run test")>]
31
+ let ``Verse four - the cat that killed`` () =
32
+ let expected =
33
+ [ "This is the cat"
34
+ "that killed the rat"
35
+ "that ate the malt"
36
+ "that lay in the house that Jack built." ]
37
+ verse 4 |> should equal expected
38
+
39
+ [<Fact(Skip = "Remove to run test")>]
40
+ let ``Verse five - the dog that worried`` () =
41
+ let expected =
42
+ [ "This is the dog"
43
+ "that worried the cat"
44
+ "that killed the rat"
45
+ "that ate the malt"
46
+ "that lay in the house that Jack built." ]
47
+ verse 5 |> should equal expected
48
+
49
+ [<Fact(Skip = "Remove to run test")>]
50
+ let ``Verse six - the cow with the crumpled horn`` () =
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"
57
+ "that lay in the house that Jack built." ]
58
+ verse 6 |> should equal expected
59
+
60
+ [<Fact(Skip = "Remove to run test")>]
61
+ let ``Verse seven - the maiden all forlorn`` () =
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"
69
+ "that lay in the house that Jack built." ]
70
+ verse 7 |> should equal expected
71
+
72
+ [<Fact(Skip = "Remove to run test")>]
73
+ let ``Verse eight - the man all tattered and torn`` () =
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"
82
+ "that lay in the house that Jack built." ]
83
+ verse 8 |> should equal expected
84
+
85
+ [<Fact(Skip = "Remove to run test")>]
86
+ let ``Verse nine - the priest all shaven and shorn`` () =
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"
96
+ "that lay in the house that Jack built." ]
97
+ verse 9 |> should equal expected
98
+
99
+ [<Fact(Skip = "Remove to run test")>]
100
+ let ``Verse 10 - the rooster that crowed in the morn`` () =
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"
111
+ "that lay in the house that Jack built." ]
112
+ verse 10 |> should equal expected
113
+
114
+ [<Fact(Skip = "Remove to run test")>]
115
+ let ``Verse 11 - the farmer sowing his corn`` () =
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"
127
+ "that lay in the house that Jack built." ]
128
+ verse 11 |> should equal expected
129
+
130
+ [<Fact(Skip = "Remove to run test")>]
131
+ let ``Verse 12 - the horse and the hound and the horn`` () =
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"
144
+ "that lay in the house that Jack built." ]
145
+ verse 12 |> should equal expected
146
+
147
+ [<Fact(Skip = "Remove to run test")>]
148
+ let ``Multiple verses`` () =
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"
183
+ "that lay in the house that Jack built." ]
184
+ verses 4 8 |> should equal expected
185
+
186
+ [<Fact(Skip = "Remove to run test")>]
187
+ let ``Full rhyme`` () =
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"
277
+ "that lay in the house that Jack built." ]
278
+ verses 1 12 |> should equal expected
279
+