trackler 2.2.1.56 → 2.2.1.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/TOPICS.txt +2 -2
  4. data/problem-specifications/exercises/zipper/description.md +1 -1
  5. data/tracks/dart/test/exercises_test.dart +9 -9
  6. data/tracks/delphi/exercises/circular-buffer/uCircularBufferExample.pas +3 -3
  7. data/tracks/delphi/exercises/circular-buffer/uCircularBufferTests.pas +160 -86
  8. data/tracks/delphi/exercises/phone-number/README.md +1 -1
  9. data/tracks/erlang/config.json +10 -0
  10. data/tracks/erlang/exercises/isogram/README.md +65 -0
  11. data/tracks/erlang/exercises/isogram/include/exercism.hrl +11 -0
  12. data/tracks/erlang/exercises/isogram/rebar.config +30 -0
  13. data/tracks/erlang/exercises/isogram/src/example.erl +16 -0
  14. data/tracks/erlang/exercises/isogram/src/isogram.app.src +9 -0
  15. data/tracks/erlang/exercises/isogram/src/isogram.erl +9 -0
  16. data/tracks/erlang/exercises/isogram/test/isogram_tests.erl +32 -0
  17. data/tracks/fsharp/exercises/binary-search/BinarySearch.fs +1 -1
  18. data/tracks/fsharp/exercises/binary-search/BinarySearchTest.fs +58 -30
  19. data/tracks/fsharp/exercises/binary-search/Example.fs +1 -1
  20. data/tracks/fsharp/exercises/poker/Example.fs +23 -20
  21. data/tracks/fsharp/exercises/poker/PokerTest.fs +135 -76
  22. data/tracks/fsharp/generators/Generators.fs +21 -0
  23. data/tracks/go/README.md +0 -15
  24. data/tracks/go/bin/run-generators +11 -0
  25. data/tracks/go/config.json +389 -277
  26. data/tracks/go/config/maintainers.json +2 -2
  27. data/tracks/go/docs/TESTS.md +0 -15
  28. data/tracks/go/exercises/accumulate/accumulate_test.go +0 -8
  29. data/tracks/go/exercises/accumulate/example.go +0 -2
  30. data/tracks/go/exercises/acronym/acronym.go +14 -2
  31. data/tracks/go/exercises/acronym/acronym_test.go +0 -8
  32. data/tracks/go/exercises/acronym/cases_test.go +2 -2
  33. data/tracks/go/exercises/acronym/example.go +0 -2
  34. data/tracks/go/exercises/all-your-base/all_your_base_test.go +0 -8
  35. data/tracks/go/exercises/all-your-base/example.go +0 -2
  36. data/tracks/go/exercises/allergies/allergies_test.go +0 -8
  37. data/tracks/go/exercises/allergies/example.go +0 -2
  38. data/tracks/go/exercises/anagram/.meta/gen.go +55 -0
  39. data/tracks/go/exercises/anagram/anagram_test.go +0 -130
  40. data/tracks/go/exercises/anagram/cases_test.go +164 -0
  41. data/tracks/go/exercises/anagram/example.go +0 -2
  42. data/tracks/go/exercises/atbash-cipher/atbash_cipher_test.go +0 -8
  43. data/tracks/go/exercises/atbash-cipher/cases_test.go +2 -2
  44. data/tracks/go/exercises/atbash-cipher/example.go +0 -2
  45. data/tracks/go/exercises/bank-account/bank_account_test.go +0 -8
  46. data/tracks/go/exercises/bank-account/example.go +0 -2
  47. data/tracks/go/exercises/beer-song/beer_test.go +0 -8
  48. data/tracks/go/exercises/beer-song/example.go +0 -2
  49. data/tracks/go/exercises/binary-search-tree/binary_search_tree_test.go +0 -8
  50. data/tracks/go/exercises/binary-search-tree/example.go +0 -2
  51. data/tracks/go/exercises/binary-search/binary_search_test.go +0 -8
  52. data/tracks/go/exercises/binary-search/example.go +0 -2
  53. data/tracks/go/exercises/binary/binary_test.go +0 -11
  54. data/tracks/go/exercises/binary/example.go +0 -2
  55. data/tracks/go/exercises/bob/bob.go +14 -0
  56. data/tracks/go/exercises/bob/bob_test.go +2 -10
  57. data/tracks/go/exercises/bob/cases_test.go +2 -2
  58. data/tracks/go/exercises/bob/example.go +12 -13
  59. data/tracks/go/exercises/book-store/README.md +92 -0
  60. data/tracks/go/exercises/book-store/book_store_test.go +91 -0
  61. data/tracks/go/exercises/book-store/example.go +52 -0
  62. data/tracks/go/exercises/bowling/bowling_test.go +0 -8
  63. data/tracks/go/exercises/bowling/cases_test.go +2 -2
  64. data/tracks/go/exercises/bowling/example.go +0 -2
  65. data/tracks/go/exercises/bracket-push/bracket_push_test.go +0 -8
  66. data/tracks/go/exercises/bracket-push/cases_test.go +2 -2
  67. data/tracks/go/exercises/bracket-push/example.go +0 -3
  68. data/tracks/go/exercises/change/cases_test.go +10 -3
  69. data/tracks/go/exercises/change/change_test.go +1 -9
  70. data/tracks/go/exercises/change/example.go +0 -2
  71. data/tracks/go/exercises/circular-buffer/circular_buffer_test.go +0 -8
  72. data/tracks/go/exercises/circular-buffer/example.go +0 -2
  73. data/tracks/go/exercises/clock/cases_test.go +2 -2
  74. data/tracks/go/exercises/clock/clock_test.go +2 -9
  75. data/tracks/go/exercises/clock/example.go +0 -2
  76. data/tracks/go/exercises/collatz-conjecture/README.md +51 -0
  77. data/tracks/go/exercises/collatz-conjecture/collatz_conjecture_test.go +77 -0
  78. data/tracks/go/exercises/collatz-conjecture/example.go +24 -0
  79. data/tracks/go/exercises/connect/cases_test.go +2 -2
  80. data/tracks/go/exercises/connect/connect_test.go +0 -8
  81. data/tracks/go/exercises/connect/example.go +0 -2
  82. data/tracks/go/exercises/crypto-square/crypto_square_test.go +0 -8
  83. data/tracks/go/exercises/crypto-square/example.go +0 -2
  84. data/tracks/go/exercises/custom-set/cases_test.go +2 -2
  85. data/tracks/go/exercises/custom-set/custom_set_test.go +0 -8
  86. data/tracks/go/exercises/custom-set/example.go +0 -2
  87. data/tracks/go/exercises/custom-set/example_slice.go +0 -2
  88. data/tracks/go/exercises/diamond/diamond_test.go +0 -8
  89. data/tracks/go/exercises/diamond/example.go +0 -2
  90. data/tracks/go/exercises/difference-of-squares/difference_of_squares_test.go +0 -8
  91. data/tracks/go/exercises/difference-of-squares/example.go +0 -2
  92. data/tracks/go/exercises/diffie-hellman/diffie_hellman_test.go +0 -8
  93. data/tracks/go/exercises/diffie-hellman/example.go +0 -2
  94. data/tracks/go/exercises/error-handling/error_handling_test.go +0 -7
  95. data/tracks/go/exercises/error-handling/example.go +0 -2
  96. data/tracks/go/exercises/etl/etl_test.go +0 -8
  97. data/tracks/go/exercises/etl/example.go +0 -2
  98. data/tracks/go/exercises/flatten-array/.meta/gen.go +52 -0
  99. data/tracks/go/exercises/flatten-array/README.md +35 -0
  100. data/tracks/go/exercises/flatten-array/cases_test.go +42 -0
  101. data/tracks/go/exercises/flatten-array/example.go +25 -0
  102. data/tracks/go/exercises/flatten-array/flatten_test.go +23 -0
  103. data/tracks/go/exercises/food-chain/example.go +0 -2
  104. data/tracks/go/exercises/food-chain/food_chain_test.go +0 -8
  105. data/tracks/go/exercises/forth/cases_test.go +2 -2
  106. data/tracks/go/exercises/forth/example.go +0 -2
  107. data/tracks/go/exercises/forth/forth_test.go +0 -8
  108. data/tracks/go/exercises/gigasecond/cases_test.go +2 -2
  109. data/tracks/go/exercises/gigasecond/example.go +0 -2
  110. data/tracks/go/exercises/gigasecond/gigasecond.go +13 -3
  111. data/tracks/go/exercises/gigasecond/gigasecond_test.go +0 -8
  112. data/tracks/go/exercises/grade-school/example.go +0 -2
  113. data/tracks/go/exercises/grade-school/grade_school_test.go +0 -8
  114. data/tracks/go/exercises/grains/example.go +0 -2
  115. data/tracks/go/exercises/grains/grains_test.go +0 -8
  116. data/tracks/go/exercises/hamming/.meta/hints.md +4 -0
  117. data/tracks/go/exercises/hamming/README.md +6 -0
  118. data/tracks/go/exercises/hamming/example.go +0 -2
  119. data/tracks/go/exercises/hamming/hamming.go +0 -2
  120. data/tracks/go/exercises/hamming/hamming_test.go +0 -8
  121. data/tracks/go/exercises/hello-world/hello_world.go +9 -1
  122. data/tracks/go/exercises/hexadecimal/example.go +0 -2
  123. data/tracks/go/exercises/hexadecimal/hexadecimal_test.go +0 -8
  124. data/tracks/go/exercises/house/example.go +0 -2
  125. data/tracks/go/exercises/house/house_test.go +0 -8
  126. data/tracks/go/exercises/isbn-verifier/README.md +60 -0
  127. data/tracks/go/exercises/isbn-verifier/example.go +57 -0
  128. data/tracks/go/exercises/isbn-verifier/isbn_verifier_test.go +35 -0
  129. data/tracks/go/exercises/isogram/example.go +0 -2
  130. data/tracks/go/exercises/isogram/isogram_test.go +0 -8
  131. data/tracks/go/exercises/kindergarten-garden/example.go +0 -2
  132. data/tracks/go/exercises/kindergarten-garden/kindergarten_garden_test.go +0 -8
  133. data/tracks/go/exercises/largest-series-product/cases_test.go +2 -2
  134. data/tracks/go/exercises/largest-series-product/example.go +0 -2
  135. data/tracks/go/exercises/largest-series-product/largest_series_product_test.go +0 -8
  136. data/tracks/go/exercises/leap/.meta/hints.md +14 -0
  137. data/tracks/go/exercises/leap/README.md +16 -0
  138. data/tracks/go/exercises/leap/cases_test.go +4 -4
  139. data/tracks/go/exercises/leap/example.go +0 -2
  140. data/tracks/go/exercises/leap/leap.go +11 -2
  141. data/tracks/go/exercises/leap/leap_test.go +0 -15
  142. data/tracks/go/exercises/ledger/example.go +0 -2
  143. data/tracks/go/exercises/ledger/ledger.go +0 -2
  144. data/tracks/go/exercises/ledger/ledger_test.go +0 -8
  145. data/tracks/go/exercises/luhn/cases_test.go +2 -2
  146. data/tracks/go/exercises/luhn/example.go +0 -2
  147. data/tracks/go/exercises/luhn/luhn_test.go +0 -8
  148. data/tracks/go/exercises/matrix/example.go +0 -2
  149. data/tracks/go/exercises/matrix/matrix_test.go +0 -8
  150. data/tracks/go/exercises/meetup/cases_test.go +2 -2
  151. data/tracks/go/exercises/meetup/example.go +0 -2
  152. data/tracks/go/exercises/meetup/meetup_test.go +0 -8
  153. data/tracks/go/exercises/minesweeper/example.go +0 -2
  154. data/tracks/go/exercises/minesweeper/minesweeper_test.go +0 -8
  155. data/tracks/go/exercises/nth-prime/example.go +0 -2
  156. data/tracks/go/exercises/nth-prime/nth_prime_test.go +0 -8
  157. data/tracks/go/exercises/nucleotide-count/example.go +0 -2
  158. data/tracks/go/exercises/nucleotide-count/nucleotide_count.go +26 -0
  159. data/tracks/go/exercises/nucleotide-count/nucleotide_count_test.go +0 -8
  160. data/tracks/go/exercises/ocr-numbers/example.go +0 -2
  161. data/tracks/go/exercises/ocr-numbers/ocr_numbers_test.go +0 -8
  162. data/tracks/go/exercises/octal/example.go +0 -2
  163. data/tracks/go/exercises/octal/octal_test.go +0 -8
  164. data/tracks/go/exercises/paasio/example.go +0 -2
  165. data/tracks/go/exercises/paasio/paasio_test.go +0 -8
  166. data/tracks/go/exercises/palindrome-products/example.go +0 -2
  167. data/tracks/go/exercises/palindrome-products/palindrome_products_test.go +0 -8
  168. data/tracks/go/exercises/pangram/example.go +0 -2
  169. data/tracks/go/exercises/pangram/pangram_test.go +2 -8
  170. data/tracks/go/exercises/parallel-letter-frequency/example.go +0 -2
  171. data/tracks/go/exercises/parallel-letter-frequency/parallel_letter_frequency_test.go +0 -8
  172. data/tracks/go/exercises/pascals-triangle/example.go +0 -2
  173. data/tracks/go/exercises/pascals-triangle/pascals_triangle_test.go +0 -8
  174. data/tracks/go/exercises/perfect-numbers/example.go +0 -2
  175. data/tracks/go/exercises/perfect-numbers/perfect_numbers_test.go +0 -8
  176. data/tracks/go/exercises/phone-number/cases_test.go +2 -2
  177. data/tracks/go/exercises/phone-number/example.go +0 -2
  178. data/tracks/go/exercises/phone-number/phone_number_test.go +0 -8
  179. data/tracks/go/exercises/pig-latin/example.go +0 -2
  180. data/tracks/go/exercises/pig-latin/pig_latin_test.go +0 -8
  181. data/tracks/go/exercises/poker/.meta/hints.md +7 -0
  182. data/tracks/go/exercises/poker/README.md +9 -0
  183. data/tracks/go/exercises/poker/cases_test.go +2 -2
  184. data/tracks/go/exercises/poker/example.go +0 -2
  185. data/tracks/go/exercises/poker/poker_test.go +0 -11
  186. data/tracks/go/exercises/pov/example.go +0 -2
  187. data/tracks/go/exercises/pov/pov_test.go +1 -9
  188. data/tracks/go/exercises/prime-factors/example.go +0 -2
  189. data/tracks/go/exercises/prime-factors/prime_factors_test.go +1 -9
  190. data/tracks/go/exercises/protein-translation/example.go +0 -2
  191. data/tracks/go/exercises/protein-translation/protein_translation_test.go +0 -8
  192. data/tracks/go/exercises/pythagorean-triplet/example.go +0 -2
  193. data/tracks/go/exercises/pythagorean-triplet/pythagorean_triplet_test.go +0 -8
  194. data/tracks/go/exercises/queen-attack/example.go +0 -2
  195. data/tracks/go/exercises/queen-attack/queen_attack_test.go +0 -8
  196. data/tracks/go/exercises/raindrops/.meta/hints.md +7 -0
  197. data/tracks/go/exercises/raindrops/cases_test.go +2 -2
  198. data/tracks/go/exercises/raindrops/example.go +0 -2
  199. data/tracks/go/exercises/raindrops/raindrops_test.go +0 -8
  200. data/tracks/go/exercises/react/example.go +0 -2
  201. data/tracks/go/exercises/react/react_test.go +0 -11
  202. data/tracks/go/exercises/rna-transcription/cases_test.go +2 -2
  203. data/tracks/go/exercises/rna-transcription/example.go +0 -2
  204. data/tracks/go/exercises/rna-transcription/rna_transcription.go +6 -0
  205. data/tracks/go/exercises/rna-transcription/rna_transcription_test.go +0 -8
  206. data/tracks/go/exercises/robot-name/example.go +0 -2
  207. data/tracks/go/exercises/robot-name/robot_name_test.go +0 -8
  208. data/tracks/go/exercises/robot-simulator/example.go +0 -1
  209. data/tracks/go/exercises/robot-simulator/robot_simulator_test.go +0 -8
  210. data/tracks/go/exercises/roman-numerals/cases_test.go +2 -2
  211. data/tracks/go/exercises/roman-numerals/example.go +0 -2
  212. data/tracks/go/exercises/roman-numerals/roman_numerals_test.go +0 -8
  213. data/tracks/go/exercises/rotational-cipher/README.md +56 -0
  214. data/tracks/go/exercises/rotational-cipher/example.go +20 -0
  215. data/tracks/go/exercises/rotational-cipher/rotational_cipher_test.go +86 -0
  216. data/tracks/go/exercises/run-length-encoding/README.md +31 -0
  217. data/tracks/go/exercises/run-length-encoding/example.go +53 -0
  218. data/tracks/go/exercises/run-length-encoding/run_length_encoding_test.go +59 -0
  219. data/tracks/go/exercises/saddle-points/example.go +0 -2
  220. data/tracks/go/exercises/saddle-points/saddle_points_test.go +0 -8
  221. data/tracks/go/exercises/say/.meta/gen.go +70 -0
  222. data/tracks/go/exercises/say/cases_test.go +88 -0
  223. data/tracks/go/exercises/say/example.go +12 -6
  224. data/tracks/go/exercises/say/say_test.go +17 -43
  225. data/tracks/go/exercises/scrabble-score/cases_test.go +2 -2
  226. data/tracks/go/exercises/scrabble-score/example.go +0 -3
  227. data/tracks/go/exercises/scrabble-score/scrabble_score_test.go +0 -8
  228. data/tracks/go/exercises/secret-handshake/cases_test.go +2 -2
  229. data/tracks/go/exercises/secret-handshake/example.go +0 -2
  230. data/tracks/go/exercises/secret-handshake/secret_handshake_test.go +0 -8
  231. data/tracks/go/exercises/series/example.go +0 -2
  232. data/tracks/go/exercises/series/series_test.go +0 -8
  233. data/tracks/go/exercises/sieve/example.go +0 -2
  234. data/tracks/go/exercises/sieve/sieve_test.go +0 -8
  235. data/tracks/go/exercises/simple-cipher/example.go +0 -2
  236. data/tracks/go/exercises/simple-cipher/simple_cipher_test.go +0 -8
  237. data/tracks/go/exercises/space-age/.meta/gen.go +56 -0
  238. data/tracks/go/exercises/space-age/README.md +42 -0
  239. data/tracks/go/exercises/space-age/cases_test.go +61 -0
  240. data/tracks/go/exercises/space-age/example.go +36 -0
  241. data/tracks/go/exercises/space-age/space_age_test.go +22 -0
  242. data/tracks/go/exercises/spiral-matrix/README.md +48 -0
  243. data/tracks/go/exercises/spiral-matrix/example.go +93 -0
  244. data/tracks/go/exercises/spiral-matrix/spiral_matrix_test.go +71 -0
  245. data/tracks/go/exercises/strain/example.go +0 -2
  246. data/tracks/go/exercises/strain/strain_test.go +0 -8
  247. data/tracks/go/exercises/sublist/.meta/gen.go +56 -0
  248. data/tracks/go/exercises/sublist/README.md +39 -0
  249. data/tracks/go/exercises/sublist/cases_test.go +115 -0
  250. data/tracks/go/exercises/sublist/example.go +49 -0
  251. data/tracks/go/exercises/sublist/sublist_test.go +22 -0
  252. data/tracks/go/exercises/sum-of-multiples/cases_test.go +4 -3
  253. data/tracks/go/exercises/sum-of-multiples/example.go +0 -2
  254. data/tracks/go/exercises/sum-of-multiples/sum_of_multiples_test.go +0 -8
  255. data/tracks/go/exercises/tournament/example.go +0 -2
  256. data/tracks/go/exercises/tournament/tournament_test.go +0 -11
  257. data/tracks/go/exercises/transpose/cases_test.go +2 -2
  258. data/tracks/go/exercises/transpose/example.go +0 -2
  259. data/tracks/go/exercises/transpose/transpose_test.go +0 -8
  260. data/tracks/go/exercises/tree-building/example.go +0 -2
  261. data/tracks/go/exercises/tree-building/tree_building.go +0 -2
  262. data/tracks/go/exercises/tree-building/tree_test.go +0 -11
  263. data/tracks/go/exercises/triangle/.meta/hints.md +10 -0
  264. data/tracks/go/exercises/triangle/example.go +0 -2
  265. data/tracks/go/exercises/triangle/triangle.go +21 -9
  266. data/tracks/go/exercises/triangle/triangle_test.go +0 -8
  267. data/tracks/go/exercises/trinary/example.go +0 -2
  268. data/tracks/go/exercises/trinary/trinary_test.go +0 -8
  269. data/tracks/go/exercises/twelve-days/example.go +0 -2
  270. data/tracks/go/exercises/twelve-days/twelve_days_test.go +0 -8
  271. data/tracks/go/exercises/two-fer/two_fer.go +2 -2
  272. data/tracks/go/exercises/variable-length-quantity/cases_test.go +2 -2
  273. data/tracks/go/exercises/variable-length-quantity/example.go +0 -2
  274. data/tracks/go/exercises/variable-length-quantity/variable_length_quantity_test.go +0 -8
  275. data/tracks/go/exercises/word-count/cases_test.go +2 -2
  276. data/tracks/go/exercises/word-count/example.go +0 -2
  277. data/tracks/go/exercises/word-count/word_count_test.go +4 -7
  278. data/tracks/go/exercises/word-search/.meta/gen.go +96 -0
  279. data/tracks/go/exercises/word-search/cases_test.go +154 -0
  280. data/tracks/go/exercises/word-search/example.go +0 -2
  281. data/tracks/go/exercises/word-search/word_search_test.go +16 -52
  282. data/tracks/go/exercises/wordy/example.go +0 -2
  283. data/tracks/go/exercises/wordy/wordy_test.go +0 -8
  284. data/tracks/go/gen/gen.go +4 -1
  285. data/tracks/java/exercises/phone-number/README.md +1 -1
  286. data/tracks/kotlin/exercises/phone-number/README.md +1 -1
  287. data/tracks/perl6/config.json +50 -0
  288. data/tracks/perl6/exercises/etl/ETL.pm6 +6 -0
  289. data/tracks/perl6/exercises/etl/Example.pm6 +7 -0
  290. data/tracks/perl6/exercises/etl/README.md +72 -0
  291. data/tracks/perl6/exercises/etl/etl.t +139 -0
  292. data/tracks/perl6/exercises/etl/example.yaml +35 -0
  293. data/tracks/perl6/exercises/hamming/Example.pm6 +6 -0
  294. data/tracks/perl6/exercises/hamming/Hamming.pm6 +4 -0
  295. data/tracks/perl6/exercises/hamming/README.md +61 -0
  296. data/tracks/perl6/exercises/hamming/example.yaml +22 -0
  297. data/tracks/perl6/exercises/hamming/hamming.t +175 -0
  298. data/tracks/perl6/exercises/meetup/Example.pm6 +37 -0
  299. data/tracks/perl6/exercises/meetup/Meetup.pm6 +4 -0
  300. data/tracks/perl6/exercises/meetup/README.md +48 -0
  301. data/tracks/perl6/exercises/meetup/example.yaml +48 -0
  302. data/tracks/perl6/exercises/meetup/meetup.t +907 -0
  303. data/tracks/perl6/exercises/pangram/Example.pm6 +5 -0
  304. data/tracks/perl6/exercises/pangram/Pangram.pm6 +4 -0
  305. data/tracks/perl6/exercises/pangram/README.md +34 -0
  306. data/tracks/perl6/exercises/pangram/example.yaml +17 -0
  307. data/tracks/perl6/exercises/pangram/pangram.t +125 -0
  308. data/tracks/perl6/exercises/phone-number/README.md +1 -1
  309. data/tracks/perl6/exercises/two-fer/Example.pm6 +14 -0
  310. data/tracks/perl6/exercises/two-fer/README.md +38 -0
  311. data/tracks/perl6/exercises/two-fer/TwoFer.pm6 +15 -0
  312. data/tracks/perl6/exercises/two-fer/example.yaml +43 -0
  313. data/tracks/perl6/exercises/two-fer/two-fer.t +82 -0
  314. data/tracks/php/config.json +13 -0
  315. data/tracks/php/exercises/rail-fence-cipher/README.md +80 -0
  316. data/tracks/php/exercises/rail-fence-cipher/example.php +61 -0
  317. data/tracks/php/exercises/rail-fence-cipher/rail-fence-cipher_test.php +76 -0
  318. data/tracks/purescript/.travis.yml +1 -1
  319. data/tracks/python/config.json +13 -0
  320. data/tracks/python/exercises/alphametics/example.py +42 -29
  321. data/tracks/python/exercises/crypto-square/crypto_square_test.py +20 -13
  322. data/tracks/python/exercises/crypto-square/example.py +1 -1
  323. data/tracks/python/exercises/kindergarten-garden/kindergarten_garden_test.py +15 -2
  324. data/tracks/python/exercises/phone-number/README.md +2 -1
  325. data/tracks/python/exercises/pov/README.md +53 -0
  326. data/tracks/python/exercises/pov/example.py +70 -0
  327. data/tracks/python/exercises/pov/pov.py +25 -0
  328. data/tracks/python/exercises/pov/pov_test.py +200 -0
  329. data/tracks/python/test/check-exercises.py +11 -1
  330. data/tracks/ruby/exercises/meetup/.meta/.version +1 -0
  331. data/tracks/ruby/exercises/meetup/.meta/generator/meetup_case.rb +11 -0
  332. data/tracks/ruby/exercises/meetup/.meta/solutions/meetup.rb +5 -0
  333. data/tracks/ruby/exercises/meetup/meetup_test.rb +48 -4
  334. metadata +90 -8
  335. data/tracks/go/exercises/accumulate/accumulate.go +0 -5
  336. data/tracks/go/exercises/clock/clock.go +0 -19
  337. data/tracks/go/exercises/pangram/pangram.go +0 -5
  338. data/tracks/go/exercises/raindrops/raindrops.go +0 -8
  339. data/tracks/go/exercises/twelve-days/HINTS.md +0 -2
  340. data/tracks/go/exercises/word-count/word_count.go +0 -9
@@ -0,0 +1,37 @@
1
+ unit module Meetup:ver<1>;
2
+
3
+ sub meetup-date (Str:D $desc --> Date:D) is export {
4
+ my (Date $date, Str $day-of-week);
5
+ given $desc.words {
6
+ $date = Date.new: year => .[*-1];
7
+
8
+ given .[*-2] {
9
+ $date.=later: months => %(<
10
+ January February March
11
+ April May June
12
+ July August September
13
+ October November December
14
+ >.antipairs){$_}
15
+ }
16
+
17
+ $day-of-week = S/day// given .[1].lc;
18
+ $date.=later: days => (given .[0] {
19
+ when 'first' { 0}
20
+ when 'second' { 7}
21
+ when 'third' {14}
22
+ when 'fourth' {21}
23
+ when /teenth$/ {$day-of-week = S/teenth// given $_; 12}
24
+ when 'last' {$date.=later(:1month); -7}
25
+ });
26
+ }
27
+
28
+ $date.=succ until $date.day-of-week == (given <
29
+ mon tues
30
+ wednes thurs
31
+ fri satur sun
32
+ > {
33
+ %(.values Z=> .keys »+» 1){$day-of-week}
34
+ });
35
+
36
+ return $date;
37
+ }
@@ -0,0 +1,4 @@
1
+ unit module Meetup:ver<1>;
2
+
3
+ sub meetup-date ($desc) is export {
4
+ }
@@ -0,0 +1,48 @@
1
+ # Meetup
2
+
3
+ Calculate the date of meetups.
4
+
5
+ Typically meetups happen on the same day of the week. In this exercise, you will take
6
+ a description of a meetup date, and return the actual meetup date.
7
+
8
+ Examples of general descriptions are:
9
+
10
+ - the first Monday of January 2017
11
+ - the third Tuesday of January 2017
12
+ - the Wednesteenth of January 2017
13
+ - the last Thursday of January 2017
14
+
15
+ Note that "Monteenth", "Tuesteenth", etc are all made up words. There
16
+ was a meetup whose members realized that there are exactly 7 numbered days in a month that
17
+ end in '-teenth'. Therefore, one is guaranteed that each day of the week
18
+ (Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
19
+ in every month.
20
+
21
+ Given examples of a meetup dates, each containing a month, day, year, and descriptor
22
+ (first, second, teenth, etc), calculate the date of the actual meetup.
23
+ For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2
24
+
25
+ ## Resources
26
+
27
+ Remember to check out the Perl 6 [documentation](https://docs.perl6.org/) and
28
+ [resources](https://perl6.org/resources/) pages for information, tips, and
29
+ examples if you get stuck.
30
+
31
+ ## Running the tests
32
+
33
+ There is a test suite and module included with the exercise.
34
+ The test suite (a file with the extension `.t`) will attempt to run routines
35
+ from the module (a file with the extension `.pm6`).
36
+ Add/modify routines in the module so that the tests will pass! You can view the
37
+ test data by executing the command `perl6 --doc *.t` (\* being the name of the
38
+ test suite), and run the test suite for the exercise by executing the command
39
+ `prove . --exec=perl6` in the exercise directory.
40
+ You can also add the `-v` flag e.g. `prove . --exec=perl6 -v` to display all
41
+ tests, including any optional tests marked as 'TODO'.
42
+
43
+ ## Source
44
+
45
+ Jeremy Hinegardner mentioned a Boulder meetup that happens on the Wednesteenth of every month [https://twitter.com/copiousfreetime](https://twitter.com/copiousfreetime)
46
+
47
+ ## Submitting Incomplete Solutions
48
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -0,0 +1,48 @@
1
+ exercise: Meetup
2
+ version: 1
3
+ plan: 97
4
+ imports: '&meetup-date'
5
+ tests: |-
6
+ is meetup-date(.<description>), Date.new(|.<year month dayofmonth>), .<description> for @($c-data<cases>);
7
+
8
+ unit: module
9
+ example: |-
10
+ sub meetup-date (Str:D $desc --> Date:D) is export {
11
+ my (Date $date, Str $day-of-week);
12
+ given $desc.words {
13
+ $date = Date.new: year => .[*-1];
14
+
15
+ given .[*-2] {
16
+ $date.=later: months => %(<
17
+ January February March
18
+ April May June
19
+ July August September
20
+ October November December
21
+ >.antipairs){$_}
22
+ }
23
+
24
+ $day-of-week = S/day// given .[1].lc;
25
+ $date.=later: days => (given .[0] {
26
+ when 'first' { 0}
27
+ when 'second' { 7}
28
+ when 'third' {14}
29
+ when 'fourth' {21}
30
+ when /teenth$/ {$day-of-week = S/teenth// given $_; 12}
31
+ when 'last' {$date.=later(:1month); -7}
32
+ });
33
+ }
34
+
35
+ $date.=succ until $date.day-of-week == (given <
36
+ mon tues
37
+ wednes thurs
38
+ fri satur sun
39
+ > {
40
+ %(.values Z=> .keys »+» 1){$day-of-week}
41
+ });
42
+
43
+ return $date;
44
+ }
45
+
46
+ stub: |-
47
+ sub meetup-date ($desc) is export {
48
+ }
@@ -0,0 +1,907 @@
1
+ #!/usr/bin/env perl6
2
+ use v6;
3
+ use Test;
4
+ use lib my $dir = $?FILE.IO.dirname;
5
+ use JSON::Fast;
6
+
7
+ my Str:D $exercise := 'Meetup';
8
+ my Version:D $version = v1;
9
+ my Str $module //= $exercise;
10
+ plan 97;
11
+
12
+ use-ok $module or bail-out;
13
+ require ::($module);
14
+
15
+ if ::($exercise).^ver !~~ $version {
16
+ warn "\nExercise version mismatch. Further tests may fail!"
17
+ ~ "\n$exercise is $(::($exercise).^ver.gist). "
18
+ ~ "Test is $($version.gist).\n";
19
+ bail-out 'Example version must match test version.' if %*ENV<EXERCISM>;
20
+ }
21
+
22
+ require ::($module) <&meetup-date>;
23
+
24
+ my $c-data = from-json $=pod.pop.contents;
25
+ is meetup-date(.<description>), Date.new(|.<year month dayofmonth>), .<description> for @($c-data<cases>);
26
+
27
+ =head2 Canonical Data
28
+ =begin code
29
+
30
+ {
31
+ "exercise": "meetup",
32
+ "version": "1.0.0",
33
+ "cases": [
34
+ {
35
+ "description": "monteenth of May 2013",
36
+ "property": "meetup",
37
+ "year": 2013,
38
+ "month": 5,
39
+ "week": "teenth",
40
+ "dayofweek": "Monday",
41
+ "dayofmonth": 13
42
+ },
43
+ {
44
+ "description": "monteenth of August 2013",
45
+ "property": "meetup",
46
+ "year": 2013,
47
+ "month": 8,
48
+ "week": "teenth",
49
+ "dayofweek": "Monday",
50
+ "dayofmonth": 19
51
+ },
52
+ {
53
+ "description": "monteenth of September 2013",
54
+ "property": "meetup",
55
+ "year": 2013,
56
+ "month": 9,
57
+ "week": "teenth",
58
+ "dayofweek": "Monday",
59
+ "dayofmonth": 16
60
+ },
61
+ {
62
+ "description": "tuesteenth of March 2013",
63
+ "property": "meetup",
64
+ "year": 2013,
65
+ "month": 3,
66
+ "week": "teenth",
67
+ "dayofweek": "Tuesday",
68
+ "dayofmonth": 19
69
+ },
70
+ {
71
+ "description": "tuesteenth of April 2013",
72
+ "property": "meetup",
73
+ "year": 2013,
74
+ "month": 4,
75
+ "week": "teenth",
76
+ "dayofweek": "Tuesday",
77
+ "dayofmonth": 16
78
+ },
79
+ {
80
+ "description": "tuesteenth of August 2013",
81
+ "property": "meetup",
82
+ "year": 2013,
83
+ "month": 8,
84
+ "week": "teenth",
85
+ "dayofweek": "Tuesday",
86
+ "dayofmonth": 13
87
+ },
88
+ {
89
+ "description": "wednesteenth of January 2013",
90
+ "property": "meetup",
91
+ "year": 2013,
92
+ "month": 1,
93
+ "week": "teenth",
94
+ "dayofweek": "Wednesday",
95
+ "dayofmonth": 16
96
+ },
97
+ {
98
+ "description": "wednesteenth of February 2013",
99
+ "property": "meetup",
100
+ "year": 2013,
101
+ "month": 2,
102
+ "week": "teenth",
103
+ "dayofweek": "Wednesday",
104
+ "dayofmonth": 13
105
+ },
106
+ {
107
+ "description": "wednesteenth of June 2013",
108
+ "property": "meetup",
109
+ "year": 2013,
110
+ "month": 6,
111
+ "week": "teenth",
112
+ "dayofweek": "Wednesday",
113
+ "dayofmonth": 19
114
+ },
115
+ {
116
+ "description": "thursteenth of May 2013",
117
+ "property": "meetup",
118
+ "year": 2013,
119
+ "month": 5,
120
+ "week": "teenth",
121
+ "dayofweek": "Thursday",
122
+ "dayofmonth": 16
123
+ },
124
+ {
125
+ "description": "thursteenth of June 2013",
126
+ "property": "meetup",
127
+ "year": 2013,
128
+ "month": 6,
129
+ "week": "teenth",
130
+ "dayofweek": "Thursday",
131
+ "dayofmonth": 13
132
+ },
133
+ {
134
+ "description": "thursteenth of September 2013",
135
+ "property": "meetup",
136
+ "year": 2013,
137
+ "month": 9,
138
+ "week": "teenth",
139
+ "dayofweek": "Thursday",
140
+ "dayofmonth": 19
141
+ },
142
+ {
143
+ "description": "friteenth of April 2013",
144
+ "property": "meetup",
145
+ "year": 2013,
146
+ "month": 4,
147
+ "week": "teenth",
148
+ "dayofweek": "Friday",
149
+ "dayofmonth": 19
150
+ },
151
+ {
152
+ "description": "friteenth of August 2013",
153
+ "property": "meetup",
154
+ "year": 2013,
155
+ "month": 8,
156
+ "week": "teenth",
157
+ "dayofweek": "Friday",
158
+ "dayofmonth": 16
159
+ },
160
+ {
161
+ "description": "friteenth of September 2013",
162
+ "property": "meetup",
163
+ "year": 2013,
164
+ "month": 9,
165
+ "week": "teenth",
166
+ "dayofweek": "Friday",
167
+ "dayofmonth": 13
168
+ },
169
+ {
170
+ "description": "saturteenth of February 2013",
171
+ "property": "meetup",
172
+ "year": 2013,
173
+ "month": 2,
174
+ "week": "teenth",
175
+ "dayofweek": "Saturday",
176
+ "dayofmonth": 16
177
+ },
178
+ {
179
+ "description": "saturteenth of April 2013",
180
+ "property": "meetup",
181
+ "year": 2013,
182
+ "month": 4,
183
+ "week": "teenth",
184
+ "dayofweek": "Saturday",
185
+ "dayofmonth": 13
186
+ },
187
+ {
188
+ "description": "saturteenth of October 2013",
189
+ "property": "meetup",
190
+ "year": 2013,
191
+ "month": 10,
192
+ "week": "teenth",
193
+ "dayofweek": "Saturday",
194
+ "dayofmonth": 19
195
+ },
196
+ {
197
+ "description": "sunteenth of May 2013",
198
+ "property": "meetup",
199
+ "year": 2013,
200
+ "month": 5,
201
+ "week": "teenth",
202
+ "dayofweek": "Sunday",
203
+ "dayofmonth": 19
204
+ },
205
+ {
206
+ "description": "sunteenth of June 2013",
207
+ "property": "meetup",
208
+ "year": 2013,
209
+ "month": 6,
210
+ "week": "teenth",
211
+ "dayofweek": "Sunday",
212
+ "dayofmonth": 16
213
+ },
214
+ {
215
+ "description": "sunteenth of October 2013",
216
+ "property": "meetup",
217
+ "year": 2013,
218
+ "month": 10,
219
+ "week": "teenth",
220
+ "dayofweek": "Sunday",
221
+ "dayofmonth": 13
222
+ },
223
+ {
224
+ "description": "first Monday of March 2013",
225
+ "property": "meetup",
226
+ "year": 2013,
227
+ "month": 3,
228
+ "week": "first",
229
+ "dayofweek": "Monday",
230
+ "dayofmonth": 4
231
+ },
232
+ {
233
+ "description": "first Monday of April 2013",
234
+ "property": "meetup",
235
+ "year": 2013,
236
+ "month": 4,
237
+ "week": "first",
238
+ "dayofweek": "Monday",
239
+ "dayofmonth": 1
240
+ },
241
+ {
242
+ "description": "first Tuesday of May 2013",
243
+ "property": "meetup",
244
+ "year": 2013,
245
+ "month": 5,
246
+ "week": "first",
247
+ "dayofweek": "Tuesday",
248
+ "dayofmonth": 7
249
+ },
250
+ {
251
+ "description": "first Tuesday of June 2013",
252
+ "property": "meetup",
253
+ "year": 2013,
254
+ "month": 6,
255
+ "week": "first",
256
+ "dayofweek": "Tuesday",
257
+ "dayofmonth": 4
258
+ },
259
+ {
260
+ "description": "first Wednesday of July 2013",
261
+ "property": "meetup",
262
+ "year": 2013,
263
+ "month": 7,
264
+ "week": "first",
265
+ "dayofweek": "Wednesday",
266
+ "dayofmonth": 3
267
+ },
268
+ {
269
+ "description": "first Wednesday of August 2013",
270
+ "property": "meetup",
271
+ "year": 2013,
272
+ "month": 8,
273
+ "week": "first",
274
+ "dayofweek": "Wednesday",
275
+ "dayofmonth": 7
276
+ },
277
+ {
278
+ "description": "first Thursday of September 2013",
279
+ "property": "meetup",
280
+ "year": 2013,
281
+ "month": 9,
282
+ "week": "first",
283
+ "dayofweek": "Thursday",
284
+ "dayofmonth": 5
285
+ },
286
+ {
287
+ "description": "first Thursday of October 2013",
288
+ "property": "meetup",
289
+ "year": 2013,
290
+ "month": 10,
291
+ "week": "first",
292
+ "dayofweek": "Thursday",
293
+ "dayofmonth": 3
294
+ },
295
+ {
296
+ "description": "first Friday of November 2013",
297
+ "property": "meetup",
298
+ "year": 2013,
299
+ "month": 11,
300
+ "week": "first",
301
+ "dayofweek": "Friday",
302
+ "dayofmonth": 1
303
+ },
304
+ {
305
+ "description": "first Friday of December 2013",
306
+ "property": "meetup",
307
+ "year": 2013,
308
+ "month": 12,
309
+ "week": "first",
310
+ "dayofweek": "Friday",
311
+ "dayofmonth": 6
312
+ },
313
+ {
314
+ "description": "first Saturday of January 2013",
315
+ "property": "meetup",
316
+ "year": 2013,
317
+ "month": 1,
318
+ "week": "first",
319
+ "dayofweek": "Saturday",
320
+ "dayofmonth": 5
321
+ },
322
+ {
323
+ "description": "first Saturday of February 2013",
324
+ "property": "meetup",
325
+ "year": 2013,
326
+ "month": 2,
327
+ "week": "first",
328
+ "dayofweek": "Saturday",
329
+ "dayofmonth": 2
330
+ },
331
+ {
332
+ "description": "first Sunday of March 2013",
333
+ "property": "meetup",
334
+ "year": 2013,
335
+ "month": 3,
336
+ "week": "first",
337
+ "dayofweek": "Sunday",
338
+ "dayofmonth": 3
339
+ },
340
+ {
341
+ "description": "first Sunday of April 2013",
342
+ "property": "meetup",
343
+ "year": 2013,
344
+ "month": 4,
345
+ "week": "first",
346
+ "dayofweek": "Sunday",
347
+ "dayofmonth": 7
348
+ },
349
+ {
350
+ "description": "second Monday of March 2013",
351
+ "property": "meetup",
352
+ "year": 2013,
353
+ "month": 3,
354
+ "week": "second",
355
+ "dayofweek": "Monday",
356
+ "dayofmonth": 11
357
+ },
358
+ {
359
+ "description": "second Monday of April 2013",
360
+ "property": "meetup",
361
+ "year": 2013,
362
+ "month": 4,
363
+ "week": "second",
364
+ "dayofweek": "Monday",
365
+ "dayofmonth": 8
366
+ },
367
+ {
368
+ "description": "second Tuesday of May 2013",
369
+ "property": "meetup",
370
+ "year": 2013,
371
+ "month": 5,
372
+ "week": "second",
373
+ "dayofweek": "Tuesday",
374
+ "dayofmonth": 14
375
+ },
376
+ {
377
+ "description": "second Tuesday of June 2013",
378
+ "property": "meetup",
379
+ "year": 2013,
380
+ "month": 6,
381
+ "week": "second",
382
+ "dayofweek": "Tuesday",
383
+ "dayofmonth": 11
384
+ },
385
+ {
386
+ "description": "second Wednesday of July 2013",
387
+ "property": "meetup",
388
+ "year": 2013,
389
+ "month": 7,
390
+ "week": "second",
391
+ "dayofweek": "Wednesday",
392
+ "dayofmonth": 10
393
+ },
394
+ {
395
+ "description": "second Wednesday of August 2013",
396
+ "property": "meetup",
397
+ "year": 2013,
398
+ "month": 8,
399
+ "week": "second",
400
+ "dayofweek": "Wednesday",
401
+ "dayofmonth": 14
402
+ },
403
+ {
404
+ "description": "second Thursday of September 2013",
405
+ "property": "meetup",
406
+ "year": 2013,
407
+ "month": 9,
408
+ "week": "second",
409
+ "dayofweek": "Thursday",
410
+ "dayofmonth": 12
411
+ },
412
+ {
413
+ "description": "second Thursday of October 2013",
414
+ "property": "meetup",
415
+ "year": 2013,
416
+ "month": 10,
417
+ "week": "second",
418
+ "dayofweek": "Thursday",
419
+ "dayofmonth": 10
420
+ },
421
+ {
422
+ "description": "second Friday of November 2013",
423
+ "property": "meetup",
424
+ "year": 2013,
425
+ "month": 11,
426
+ "week": "second",
427
+ "dayofweek": "Friday",
428
+ "dayofmonth": 8
429
+ },
430
+ {
431
+ "description": "second Friday of December 2013",
432
+ "property": "meetup",
433
+ "year": 2013,
434
+ "month": 12,
435
+ "week": "second",
436
+ "dayofweek": "Friday",
437
+ "dayofmonth": 13
438
+ },
439
+ {
440
+ "description": "second Saturday of January 2013",
441
+ "property": "meetup",
442
+ "year": 2013,
443
+ "month": 1,
444
+ "week": "second",
445
+ "dayofweek": "Saturday",
446
+ "dayofmonth": 12
447
+ },
448
+ {
449
+ "description": "second Saturday of February 2013",
450
+ "property": "meetup",
451
+ "year": 2013,
452
+ "month": 2,
453
+ "week": "second",
454
+ "dayofweek": "Saturday",
455
+ "dayofmonth": 9
456
+ },
457
+ {
458
+ "description": "second Sunday of March 2013",
459
+ "property": "meetup",
460
+ "year": 2013,
461
+ "month": 3,
462
+ "week": "second",
463
+ "dayofweek": "Sunday",
464
+ "dayofmonth": 10
465
+ },
466
+ {
467
+ "description": "second Sunday of April 2013",
468
+ "property": "meetup",
469
+ "year": 2013,
470
+ "month": 4,
471
+ "week": "second",
472
+ "dayofweek": "Sunday",
473
+ "dayofmonth": 14
474
+ },
475
+ {
476
+ "description": "third Monday of March 2013",
477
+ "property": "meetup",
478
+ "year": 2013,
479
+ "month": 3,
480
+ "week": "third",
481
+ "dayofweek": "Monday",
482
+ "dayofmonth": 18
483
+ },
484
+ {
485
+ "description": "third Monday of April 2013",
486
+ "property": "meetup",
487
+ "year": 2013,
488
+ "month": 4,
489
+ "week": "third",
490
+ "dayofweek": "Monday",
491
+ "dayofmonth": 15
492
+ },
493
+ {
494
+ "description": "third Tuesday of May 2013",
495
+ "property": "meetup",
496
+ "year": 2013,
497
+ "month": 5,
498
+ "week": "third",
499
+ "dayofweek": "Tuesday",
500
+ "dayofmonth": 21
501
+ },
502
+ {
503
+ "description": "third Tuesday of June 2013",
504
+ "property": "meetup",
505
+ "year": 2013,
506
+ "month": 6,
507
+ "week": "third",
508
+ "dayofweek": "Tuesday",
509
+ "dayofmonth": 18
510
+ },
511
+ {
512
+ "description": "third Wednesday of July 2013",
513
+ "property": "meetup",
514
+ "year": 2013,
515
+ "month": 7,
516
+ "week": "third",
517
+ "dayofweek": "Wednesday",
518
+ "dayofmonth": 17
519
+ },
520
+ {
521
+ "description": "third Wednesday of August 2013",
522
+ "property": "meetup",
523
+ "year": 2013,
524
+ "month": 8,
525
+ "week": "third",
526
+ "dayofweek": "Wednesday",
527
+ "dayofmonth": 21
528
+ },
529
+ {
530
+ "description": "third Thursday of September 2013",
531
+ "property": "meetup",
532
+ "year": 2013,
533
+ "month": 9,
534
+ "week": "third",
535
+ "dayofweek": "Thursday",
536
+ "dayofmonth": 19
537
+ },
538
+ {
539
+ "description": "third Thursday of October 2013",
540
+ "property": "meetup",
541
+ "year": 2013,
542
+ "month": 10,
543
+ "week": "third",
544
+ "dayofweek": "Thursday",
545
+ "dayofmonth": 17
546
+ },
547
+ {
548
+ "description": "third Friday of November 2013",
549
+ "property": "meetup",
550
+ "year": 2013,
551
+ "month": 11,
552
+ "week": "third",
553
+ "dayofweek": "Friday",
554
+ "dayofmonth": 15
555
+ },
556
+ {
557
+ "description": "third Friday of December 2013",
558
+ "property": "meetup",
559
+ "year": 2013,
560
+ "month": 12,
561
+ "week": "third",
562
+ "dayofweek": "Friday",
563
+ "dayofmonth": 20
564
+ },
565
+ {
566
+ "description": "third Saturday of January 2013",
567
+ "property": "meetup",
568
+ "year": 2013,
569
+ "month": 1,
570
+ "week": "third",
571
+ "dayofweek": "Saturday",
572
+ "dayofmonth": 19
573
+ },
574
+ {
575
+ "description": "third Saturday of February 2013",
576
+ "property": "meetup",
577
+ "year": 2013,
578
+ "month": 2,
579
+ "week": "third",
580
+ "dayofweek": "Saturday",
581
+ "dayofmonth": 16
582
+ },
583
+ {
584
+ "description": "third Sunday of March 2013",
585
+ "property": "meetup",
586
+ "year": 2013,
587
+ "month": 3,
588
+ "week": "third",
589
+ "dayofweek": "Sunday",
590
+ "dayofmonth": 17
591
+ },
592
+ {
593
+ "description": "third Sunday of April 2013",
594
+ "property": "meetup",
595
+ "year": 2013,
596
+ "month": 4,
597
+ "week": "third",
598
+ "dayofweek": "Sunday",
599
+ "dayofmonth": 21
600
+ },
601
+ {
602
+ "description": "fourth Monday of March 2013",
603
+ "property": "meetup",
604
+ "year": 2013,
605
+ "month": 3,
606
+ "week": "fourth",
607
+ "dayofweek": "Monday",
608
+ "dayofmonth": 25
609
+ },
610
+ {
611
+ "description": "fourth Monday of April 2013",
612
+ "property": "meetup",
613
+ "year": 2013,
614
+ "month": 4,
615
+ "week": "fourth",
616
+ "dayofweek": "Monday",
617
+ "dayofmonth": 22
618
+ },
619
+ {
620
+ "description": "fourth Tuesday of May 2013",
621
+ "property": "meetup",
622
+ "year": 2013,
623
+ "month": 5,
624
+ "week": "fourth",
625
+ "dayofweek": "Tuesday",
626
+ "dayofmonth": 28
627
+ },
628
+ {
629
+ "description": "fourth Tuesday of June 2013",
630
+ "property": "meetup",
631
+ "year": 2013,
632
+ "month": 6,
633
+ "week": "fourth",
634
+ "dayofweek": "Tuesday",
635
+ "dayofmonth": 25
636
+ },
637
+ {
638
+ "description": "fourth Wednesday of July 2013",
639
+ "property": "meetup",
640
+ "year": 2013,
641
+ "month": 7,
642
+ "week": "fourth",
643
+ "dayofweek": "Wednesday",
644
+ "dayofmonth": 24
645
+ },
646
+ {
647
+ "description": "fourth Wednesday of August 2013",
648
+ "property": "meetup",
649
+ "year": 2013,
650
+ "month": 8,
651
+ "week": "fourth",
652
+ "dayofweek": "Wednesday",
653
+ "dayofmonth": 28
654
+ },
655
+ {
656
+ "description": "fourth Thursday of September 2013",
657
+ "property": "meetup",
658
+ "year": 2013,
659
+ "month": 9,
660
+ "week": "fourth",
661
+ "dayofweek": "Thursday",
662
+ "dayofmonth": 26
663
+ },
664
+ {
665
+ "description": "fourth Thursday of October 2013",
666
+ "property": "meetup",
667
+ "year": 2013,
668
+ "month": 10,
669
+ "week": "fourth",
670
+ "dayofweek": "Thursday",
671
+ "dayofmonth": 24
672
+ },
673
+ {
674
+ "description": "fourth Friday of November 2013",
675
+ "property": "meetup",
676
+ "year": 2013,
677
+ "month": 11,
678
+ "week": "fourth",
679
+ "dayofweek": "Friday",
680
+ "dayofmonth": 22
681
+ },
682
+ {
683
+ "description": "fourth Friday of December 2013",
684
+ "property": "meetup",
685
+ "year": 2013,
686
+ "month": 12,
687
+ "week": "fourth",
688
+ "dayofweek": "Friday",
689
+ "dayofmonth": 27
690
+ },
691
+ {
692
+ "description": "fourth Saturday of January 2013",
693
+ "property": "meetup",
694
+ "year": 2013,
695
+ "month": 1,
696
+ "week": "fourth",
697
+ "dayofweek": "Saturday",
698
+ "dayofmonth": 26
699
+ },
700
+ {
701
+ "description": "fourth Saturday of February 2013",
702
+ "property": "meetup",
703
+ "year": 2013,
704
+ "month": 2,
705
+ "week": "fourth",
706
+ "dayofweek": "Saturday",
707
+ "dayofmonth": 23
708
+ },
709
+ {
710
+ "description": "fourth Sunday of March 2013",
711
+ "property": "meetup",
712
+ "year": 2013,
713
+ "month": 3,
714
+ "week": "fourth",
715
+ "dayofweek": "Sunday",
716
+ "dayofmonth": 24
717
+ },
718
+ {
719
+ "description": "fourth Sunday of April 2013",
720
+ "property": "meetup",
721
+ "year": 2013,
722
+ "month": 4,
723
+ "week": "fourth",
724
+ "dayofweek": "Sunday",
725
+ "dayofmonth": 28
726
+ },
727
+ {
728
+ "description": "last Monday of March 2013",
729
+ "property": "meetup",
730
+ "year": 2013,
731
+ "month": 3,
732
+ "week": "last",
733
+ "dayofweek": "Monday",
734
+ "dayofmonth": 25
735
+ },
736
+ {
737
+ "description": "last Monday of April 2013",
738
+ "property": "meetup",
739
+ "year": 2013,
740
+ "month": 4,
741
+ "week": "last",
742
+ "dayofweek": "Monday",
743
+ "dayofmonth": 29
744
+ },
745
+ {
746
+ "description": "last Tuesday of May 2013",
747
+ "property": "meetup",
748
+ "year": 2013,
749
+ "month": 5,
750
+ "week": "last",
751
+ "dayofweek": "Tuesday",
752
+ "dayofmonth": 28
753
+ },
754
+ {
755
+ "description": "last Tuesday of June 2013",
756
+ "property": "meetup",
757
+ "year": 2013,
758
+ "month": 6,
759
+ "week": "last",
760
+ "dayofweek": "Tuesday",
761
+ "dayofmonth": 25
762
+ },
763
+ {
764
+ "description": "last Wednesday of July 2013",
765
+ "property": "meetup",
766
+ "year": 2013,
767
+ "month": 7,
768
+ "week": "last",
769
+ "dayofweek": "Wednesday",
770
+ "dayofmonth": 31
771
+ },
772
+ {
773
+ "description": "last Wednesday of August 2013",
774
+ "property": "meetup",
775
+ "year": 2013,
776
+ "month": 8,
777
+ "week": "last",
778
+ "dayofweek": "Wednesday",
779
+ "dayofmonth": 28
780
+ },
781
+ {
782
+ "description": "last Thursday of September 2013",
783
+ "property": "meetup",
784
+ "year": 2013,
785
+ "month": 9,
786
+ "week": "last",
787
+ "dayofweek": "Thursday",
788
+ "dayofmonth": 26
789
+ },
790
+ {
791
+ "description": "last Thursday of October 2013",
792
+ "property": "meetup",
793
+ "year": 2013,
794
+ "month": 10,
795
+ "week": "last",
796
+ "dayofweek": "Thursday",
797
+ "dayofmonth": 31
798
+ },
799
+ {
800
+ "description": "last Friday of November 2013",
801
+ "property": "meetup",
802
+ "year": 2013,
803
+ "month": 11,
804
+ "week": "last",
805
+ "dayofweek": "Friday",
806
+ "dayofmonth": 29
807
+ },
808
+ {
809
+ "description": "last Friday of December 2013",
810
+ "property": "meetup",
811
+ "year": 2013,
812
+ "month": 12,
813
+ "week": "last",
814
+ "dayofweek": "Friday",
815
+ "dayofmonth": 27
816
+ },
817
+ {
818
+ "description": "last Saturday of January 2013",
819
+ "property": "meetup",
820
+ "year": 2013,
821
+ "month": 1,
822
+ "week": "last",
823
+ "dayofweek": "Saturday",
824
+ "dayofmonth": 26
825
+ },
826
+ {
827
+ "description": "last Saturday of February 2013",
828
+ "property": "meetup",
829
+ "year": 2013,
830
+ "month": 2,
831
+ "week": "last",
832
+ "dayofweek": "Saturday",
833
+ "dayofmonth": 23
834
+ },
835
+ {
836
+ "description": "last Sunday of March 2013",
837
+ "property": "meetup",
838
+ "year": 2013,
839
+ "month": 3,
840
+ "week": "last",
841
+ "dayofweek": "Sunday",
842
+ "dayofmonth": 31
843
+ },
844
+ {
845
+ "description": "last Sunday of April 2013",
846
+ "property": "meetup",
847
+ "year": 2013,
848
+ "month": 4,
849
+ "week": "last",
850
+ "dayofweek": "Sunday",
851
+ "dayofmonth": 28
852
+ },
853
+ {
854
+ "description": "last Wednesday of February 2012",
855
+ "property": "meetup",
856
+ "year": 2012,
857
+ "month": 2,
858
+ "week": "last",
859
+ "dayofweek": "Wednesday",
860
+ "dayofmonth": 29
861
+ },
862
+ {
863
+ "description": "last Wednesday of December 2014",
864
+ "property": "meetup",
865
+ "year": 2014,
866
+ "month": 12,
867
+ "week": "last",
868
+ "dayofweek": "Wednesday",
869
+ "dayofmonth": 31
870
+ },
871
+ {
872
+ "description": "last Sunday of February 2015",
873
+ "property": "meetup",
874
+ "year": 2015,
875
+ "month": 2,
876
+ "week": "last",
877
+ "dayofweek": "Sunday",
878
+ "dayofmonth": 22
879
+ },
880
+ {
881
+ "description": "first Friday of December 2012",
882
+ "property": "meetup",
883
+ "year": 2012,
884
+ "month": 12,
885
+ "week": "first",
886
+ "dayofweek": "Friday",
887
+ "dayofmonth": 7
888
+ }
889
+ ]
890
+ }
891
+
892
+ =end code
893
+
894
+ unless %*ENV<EXERCISM> {
895
+ skip-rest 'exercism tests';
896
+ exit;
897
+ }
898
+
899
+ subtest 'canonical-data' => {
900
+ (my $c-data-file = "$dir/../../problem-specifications/exercises/{
901
+ $dir.IO.resolve.basename
902
+ }/canonical-data.json".IO.resolve) ~~ :f ??
903
+ is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
904
+ flunk 'problem-specifications file not found';
905
+ }
906
+
907
+ INIT { $module = 'Example' if %*ENV<EXERCISM> }