trackler 2.1.0.9 → 2.1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/perfect-numbers/description.md +2 -2
  3. data/common/exercises/phone-number/canonical-data.json +1 -7
  4. data/common/exercises/tournament/canonical-data.json +96 -21
  5. data/common/exercises/tournament/description.md +0 -5
  6. data/lib/trackler/version.rb +1 -1
  7. data/tracks/coq/README.md +6 -8
  8. data/tracks/coq/exercises/hello-world/example.v +3 -0
  9. data/tracks/coq/exercises/hello-world/hello-world.v +3 -0
  10. data/tracks/coq/exercises/rna-transcription/DNA.v +4 -0
  11. data/tracks/coq/exercises/rna-transcription/example.v +15 -0
  12. data/tracks/coq/exercises/rna-transcription/rna-transcription.v +5 -0
  13. data/tracks/coq/exercises/tautology/description.md +1 -0
  14. data/tracks/coq/exercises/tautology/example.v +4 -0
  15. data/tracks/coq/exercises/tautology/tautology.v +4 -0
  16. data/tracks/haskell/exercises/accumulate/package.yaml +1 -0
  17. data/tracks/haskell/exercises/accumulate/test/Tests.hs +0 -3
  18. data/tracks/haskell/exercises/acronym/package.yaml +1 -0
  19. data/tracks/haskell/exercises/acronym/test/Tests.hs +0 -5
  20. data/tracks/haskell/exercises/all-your-base/package.yaml +1 -0
  21. data/tracks/haskell/exercises/all-your-base/test/Tests.hs +0 -2
  22. data/tracks/haskell/exercises/allergies/package.yaml +1 -0
  23. data/tracks/haskell/exercises/allergies/test/Tests.hs +0 -2
  24. data/tracks/haskell/exercises/alphametics/package.yaml +1 -0
  25. data/tracks/haskell/exercises/alphametics/test/Tests.hs +0 -2
  26. data/tracks/haskell/exercises/anagram/package.yaml +1 -0
  27. data/tracks/haskell/exercises/anagram/test/Tests.hs +0 -2
  28. data/tracks/haskell/exercises/atbash-cipher/package.yaml +1 -0
  29. data/tracks/haskell/exercises/atbash-cipher/test/Tests.hs +0 -2
  30. data/tracks/haskell/exercises/bank-account/package.yaml +1 -0
  31. data/tracks/haskell/exercises/bank-account/test/Tests.hs +0 -3
  32. data/tracks/haskell/exercises/beer-song/package.yaml +1 -0
  33. data/tracks/haskell/exercises/binary/package.yaml +1 -0
  34. data/tracks/haskell/exercises/binary/test/Tests.hs +0 -1
  35. data/tracks/haskell/exercises/binary-search-tree/package.yaml +1 -0
  36. data/tracks/haskell/exercises/binary-search-tree/test/Tests.hs +0 -3
  37. data/tracks/haskell/exercises/bob/package.yaml +1 -0
  38. data/tracks/haskell/exercises/bob/test/Tests.hs +0 -2
  39. data/tracks/haskell/exercises/bowling/package.yaml +1 -0
  40. data/tracks/haskell/exercises/bowling/test/Tests.hs +0 -2
  41. data/tracks/haskell/exercises/bracket-push/package.yaml +1 -0
  42. data/tracks/haskell/exercises/bracket-push/test/Tests.hs +1 -6
  43. data/tracks/haskell/exercises/change/package.yaml +1 -0
  44. data/tracks/haskell/exercises/change/test/Tests.hs +0 -2
  45. data/tracks/haskell/exercises/clock/package.yaml +1 -0
  46. data/tracks/haskell/exercises/clock/test/Tests.hs +0 -2
  47. data/tracks/haskell/exercises/connect/package.yaml +1 -0
  48. data/tracks/haskell/exercises/connect/test/Tests.hs +0 -2
  49. data/tracks/haskell/exercises/crypto-square/package.yaml +1 -0
  50. data/tracks/haskell/exercises/crypto-square/test/Tests.hs +0 -2
  51. data/tracks/haskell/exercises/custom-set/package.yaml +1 -0
  52. data/tracks/haskell/exercises/custom-set/test/Tests.hs +0 -3
  53. data/tracks/haskell/exercises/difference-of-squares/package.yaml +1 -0
  54. data/tracks/haskell/exercises/difference-of-squares/test/Tests.hs +0 -3
  55. data/tracks/haskell/exercises/dominoes/package.yaml +1 -0
  56. data/tracks/haskell/exercises/dominoes/test/Tests.hs +0 -2
  57. data/tracks/haskell/exercises/etl/package.yaml +1 -0
  58. data/tracks/haskell/exercises/etl/test/Tests.hs +0 -2
  59. data/tracks/haskell/exercises/food-chain/package.yaml +1 -0
  60. data/tracks/haskell/exercises/forth/package.yaml +1 -0
  61. data/tracks/haskell/exercises/forth/test/Tests.hs +0 -2
  62. data/tracks/haskell/exercises/gigasecond/package.yaml +1 -0
  63. data/tracks/haskell/exercises/gigasecond/test/Tests.hs +0 -3
  64. data/tracks/haskell/exercises/go-counting/package.yaml +1 -0
  65. data/tracks/haskell/exercises/go-counting/test/Tests.hs +0 -3
  66. data/tracks/haskell/exercises/grade-school/package.yaml +1 -0
  67. data/tracks/haskell/exercises/grade-school/test/Tests.hs +0 -3
  68. data/tracks/haskell/exercises/grains/package.yaml +1 -0
  69. data/tracks/haskell/exercises/grains/test/Tests.hs +0 -2
  70. data/tracks/haskell/exercises/hamming/package.yaml +1 -0
  71. data/tracks/haskell/exercises/hamming/test/Tests.hs +0 -2
  72. data/tracks/haskell/exercises/hello-world/package.yaml +1 -0
  73. data/tracks/haskell/exercises/hexadecimal/package.yaml +1 -0
  74. data/tracks/haskell/exercises/hexadecimal/test/Tests.hs +0 -3
  75. data/tracks/haskell/exercises/house/package.yaml +1 -0
  76. data/tracks/haskell/exercises/kindergarten-garden/package.yaml +1 -0
  77. data/tracks/haskell/exercises/kindergarten-garden/test/Tests.hs +0 -3
  78. data/tracks/haskell/exercises/largest-series-product/package.yaml +1 -0
  79. data/tracks/haskell/exercises/largest-series-product/test/Tests.hs +0 -3
  80. data/tracks/haskell/exercises/leap/package.yaml +1 -0
  81. data/tracks/haskell/exercises/leap/test/Tests.hs +0 -2
  82. data/tracks/haskell/exercises/lens-person/package.yaml +1 -0
  83. data/tracks/haskell/exercises/lens-person/test/Tests.hs +0 -3
  84. data/tracks/haskell/exercises/linked-list/package.yaml +1 -0
  85. data/tracks/haskell/exercises/linked-list/test/Tests.hs +0 -3
  86. data/tracks/haskell/exercises/list-ops/package.yaml +1 -0
  87. data/tracks/haskell/exercises/list-ops/test/Tests.hs +0 -3
  88. data/tracks/haskell/exercises/luhn/package.yaml +1 -0
  89. data/tracks/haskell/exercises/luhn/test/Tests.hs +0 -3
  90. data/tracks/haskell/exercises/matrix/package.yaml +1 -0
  91. data/tracks/haskell/exercises/matrix/test/Tests.hs +0 -3
  92. data/tracks/haskell/exercises/meetup/package.yaml +1 -0
  93. data/tracks/haskell/exercises/meetup/test/Tests.hs +0 -2
  94. data/tracks/haskell/exercises/minesweeper/package.yaml +1 -0
  95. data/tracks/haskell/exercises/minesweeper/test/Tests.hs +0 -3
  96. data/tracks/haskell/exercises/nth-prime/package.yaml +1 -0
  97. data/tracks/haskell/exercises/nth-prime/test/Tests.hs +0 -2
  98. data/tracks/haskell/exercises/nucleotide-count/package.yaml +1 -0
  99. data/tracks/haskell/exercises/nucleotide-count/test/Tests.hs +0 -2
  100. data/tracks/haskell/exercises/ocr-numbers/package.yaml +1 -0
  101. data/tracks/haskell/exercises/ocr-numbers/test/Tests.hs +0 -3
  102. data/tracks/haskell/exercises/octal/package.yaml +1 -0
  103. data/tracks/haskell/exercises/octal/test/Tests.hs +0 -3
  104. data/tracks/haskell/exercises/palindrome-products/package.yaml +1 -0
  105. data/tracks/haskell/exercises/palindrome-products/test/Tests.hs +0 -3
  106. data/tracks/haskell/exercises/pangram/package.yaml +1 -0
  107. data/tracks/haskell/exercises/pangram/test/Tests.hs +0 -5
  108. data/tracks/haskell/exercises/parallel-letter-frequency/package.yaml +1 -0
  109. data/tracks/haskell/exercises/parallel-letter-frequency/test/Tests.hs +0 -3
  110. data/tracks/haskell/exercises/pascals-triangle/package.yaml +1 -0
  111. data/tracks/haskell/exercises/pascals-triangle/test/Tests.hs +0 -2
  112. data/tracks/haskell/exercises/phone-number/package.yaml +1 -0
  113. data/tracks/haskell/exercises/phone-number/test/Tests.hs +0 -2
  114. data/tracks/haskell/exercises/pig-latin/package.yaml +1 -0
  115. data/tracks/haskell/exercises/pig-latin/test/Tests.hs +0 -2
  116. data/tracks/haskell/exercises/pov/package.yaml +1 -0
  117. data/tracks/haskell/exercises/pov/test/Tests.hs +0 -2
  118. data/tracks/haskell/exercises/prime-factors/package.yaml +1 -0
  119. data/tracks/haskell/exercises/prime-factors/test/Tests.hs +0 -2
  120. data/tracks/haskell/exercises/pythagorean-triplet/package.yaml +1 -0
  121. data/tracks/haskell/exercises/pythagorean-triplet/test/Tests.hs +0 -3
  122. data/tracks/haskell/exercises/queen-attack/package.yaml +1 -0
  123. data/tracks/haskell/exercises/queen-attack/test/Tests.hs +0 -2
  124. data/tracks/haskell/exercises/raindrops/package.yaml +1 -0
  125. data/tracks/haskell/exercises/raindrops/test/Tests.hs +0 -2
  126. data/tracks/haskell/exercises/rna-transcription/package.yaml +1 -0
  127. data/tracks/haskell/exercises/rna-transcription/test/Tests.hs +0 -2
  128. data/tracks/haskell/exercises/robot-name/package.yaml +1 -0
  129. data/tracks/haskell/exercises/robot-name/test/Tests.hs +0 -3
  130. data/tracks/haskell/exercises/robot-simulator/package.yaml +1 -0
  131. data/tracks/haskell/exercises/robot-simulator/test/Tests.hs +0 -3
  132. data/tracks/haskell/exercises/roman-numerals/package.yaml +1 -0
  133. data/tracks/haskell/exercises/roman-numerals/test/Tests.hs +0 -2
  134. data/tracks/haskell/exercises/run-length-encoding/package.yaml +1 -0
  135. data/tracks/haskell/exercises/run-length-encoding/test/Tests.hs +0 -4
  136. data/tracks/haskell/exercises/saddle-points/package.yaml +1 -0
  137. data/tracks/haskell/exercises/saddle-points/test/Tests.hs +0 -3
  138. data/tracks/haskell/exercises/say/package.yaml +1 -0
  139. data/tracks/haskell/exercises/say/test/Tests.hs +0 -2
  140. data/tracks/haskell/exercises/scrabble-score/package.yaml +1 -0
  141. data/tracks/haskell/exercises/scrabble-score/test/Tests.hs +0 -2
  142. data/tracks/haskell/exercises/secret-handshake/package.yaml +1 -0
  143. data/tracks/haskell/exercises/secret-handshake/test/Tests.hs +0 -2
  144. data/tracks/haskell/exercises/series/package.yaml +1 -0
  145. data/tracks/haskell/exercises/series/test/Tests.hs +0 -3
  146. data/tracks/haskell/exercises/sgf-parsing/package.yaml +1 -0
  147. data/tracks/haskell/exercises/sgf-parsing/test/Tests.hs +0 -3
  148. data/tracks/haskell/exercises/sieve/package.yaml +1 -0
  149. data/tracks/haskell/exercises/sieve/test/Tests.hs +0 -2
  150. data/tracks/haskell/exercises/simple-cipher/package.yaml +1 -0
  151. data/tracks/haskell/exercises/simple-cipher/test/Tests.hs +0 -3
  152. data/tracks/haskell/exercises/simple-linked-list/package.yaml +1 -0
  153. data/tracks/haskell/exercises/simple-linked-list/test/Tests.hs +0 -3
  154. data/tracks/haskell/exercises/space-age/package.yaml +1 -0
  155. data/tracks/haskell/exercises/space-age/test/Tests.hs +0 -2
  156. data/tracks/haskell/exercises/strain/package.yaml +1 -0
  157. data/tracks/haskell/exercises/strain/test/Tests.hs +0 -3
  158. data/tracks/haskell/exercises/sublist/package.yaml +1 -0
  159. data/tracks/haskell/exercises/sublist/test/Tests.hs +0 -2
  160. data/tracks/haskell/exercises/sum-of-multiples/package.yaml +1 -0
  161. data/tracks/haskell/exercises/sum-of-multiples/test/Tests.hs +0 -2
  162. data/tracks/haskell/exercises/triangle/package.yaml +1 -0
  163. data/tracks/haskell/exercises/triangle/test/Tests.hs +0 -3
  164. data/tracks/haskell/exercises/trinary/package.yaml +1 -0
  165. data/tracks/haskell/exercises/trinary/test/Tests.hs +0 -3
  166. data/tracks/haskell/exercises/word-count/package.yaml +1 -0
  167. data/tracks/haskell/exercises/word-count/test/Tests.hs +0 -2
  168. data/tracks/haskell/exercises/wordy/package.yaml +1 -0
  169. data/tracks/haskell/exercises/wordy/test/Tests.hs +0 -2
  170. data/tracks/haskell/exercises/zebra-puzzle/package.yaml +1 -0
  171. data/tracks/haskell/exercises/zipper/package.yaml +1 -0
  172. data/tracks/haskell/exercises/zipper/test/Tests.hs +0 -3
  173. data/tracks/java/exercises/book-store/src/test/java/BookstoreTest.java +12 -12
  174. data/tracks/java/exercises/ocr-numbers/src/test/java/OpticalCharacterReaderTest.java +16 -16
  175. data/tracks/java/exercises/strain/src/test/java/StrainTest.java +11 -11
  176. data/tracks/perl6/README.md +12 -0
  177. data/tracks/perl6/bin/README.md +3 -0
  178. data/tracks/perl6/config.json +20 -20
  179. data/tracks/perl6/exercises/accumulate/{Example.pm → Example.pm6} +0 -0
  180. data/tracks/perl6/exercises/all-your-base/{Example.pm → Example.pm6} +0 -0
  181. data/tracks/perl6/exercises/allergies/{Example.pm → Example.pm6} +0 -0
  182. data/tracks/perl6/exercises/anagram/{Example.pm → Example.pm6} +0 -0
  183. data/tracks/perl6/exercises/atbash-cipher/{Example.pm → Example.pm6} +0 -0
  184. data/tracks/perl6/exercises/binary/{Example.pm → Example.pm6} +0 -0
  185. data/tracks/perl6/exercises/bob/{Example.pm → Example.pm6} +0 -0
  186. data/tracks/perl6/exercises/bob/bob.t +181 -180
  187. data/tracks/perl6/exercises/bob/example.yaml +1 -0
  188. data/tracks/perl6/exercises/grade-school/{Example.pm → Example.pm6} +0 -0
  189. data/tracks/perl6/exercises/grade-school/grade-school.t +9 -18
  190. data/tracks/perl6/exercises/grains/{Example.pm → Example.pm6} +0 -0
  191. data/tracks/perl6/exercises/hello-world/{Example.pm → Example.pm6} +0 -0
  192. data/tracks/perl6/exercises/hello-world/example.yaml +1 -0
  193. data/tracks/perl6/exercises/hello-world/hello-world.t +38 -43
  194. data/tracks/perl6/exercises/leap/{Example.pm → Example.pm6} +0 -0
  195. data/tracks/perl6/exercises/leap/leap.t +40 -42
  196. data/tracks/perl6/exercises/phone-number/{Example.pm → Example.pm6} +2 -2
  197. data/tracks/perl6/exercises/phone-number/PhoneNumber.pm6 +1 -1
  198. data/tracks/perl6/exercises/phone-number/example.yaml +2 -2
  199. data/tracks/perl6/exercises/phone-number/phone-number.t +3 -9
  200. data/tracks/perl6/exercises/raindrops/{Example.pm → Example.pm6} +0 -0
  201. data/tracks/perl6/exercises/rna-transcription/{Example.pm → Example.pm6} +0 -0
  202. data/tracks/perl6/exercises/robot-name/{Example.pm → Example.pm6} +0 -0
  203. data/tracks/perl6/exercises/scrabble-score/{Example.pm → Example.pm6} +0 -0
  204. data/tracks/perl6/exercises/space-age/{Example.pm → Example.pm6} +0 -0
  205. data/tracks/perl6/exercises/trinary/{Example.pm → Example.pm6} +0 -0
  206. data/tracks/perl6/exercises/word-count/{Example.pm → Example.pm6} +0 -0
  207. data/tracks/perl6/exercises/wordy/{Example.pm → Example.pm6} +0 -0
  208. data/tracks/python/.github/stale.yml +4 -4
  209. data/tracks/python/config.json +24 -0
  210. data/tracks/python/exercises/alphametics/alphametics.py +2 -0
  211. data/tracks/python/exercises/alphametics/alphametics_test.py +71 -0
  212. data/tracks/python/exercises/alphametics/example.py +29 -0
  213. data/tracks/python/exercises/book-store/book_store.py +2 -0
  214. data/tracks/python/exercises/book-store/book_store_test.py +72 -0
  215. data/tracks/python/exercises/book-store/example.py +29 -0
  216. data/tracks/python/exercises/meetup/meetup_test.py +341 -1
  217. data/tracks/python/exercises/tournament/example.py +45 -0
  218. data/tracks/python/exercises/tournament/tournament.py +2 -0
  219. data/tracks/python/exercises/tournament/tournament_test.py +70 -0
  220. data/tracks/python/exercises/variable-length-quantity/example.py +34 -0
  221. data/tracks/python/exercises/variable-length-quantity/variable_length_quantity.py +6 -0
  222. data/tracks/python/exercises/variable-length-quantity/variable_length_quantity_test.py +100 -0
  223. data/tracks/r/config.json +23 -23
  224. data/tracks/r/exercises/perfect-numbers/test_perfect-numbers.R +1 -1
  225. data/tracks/r/exercises/prime-factors/test_prime-factors.R +2 -0
  226. data/tracks/r/exercises/tournament/example.R +2 -5
  227. data/tracks/scala/exercises/leap/example.scala +4 -4
  228. data/tracks/scala/exercises/leap/src/main/scala/Leap.scala +3 -0
  229. data/tracks/scala/exercises/leap/src/test/scala/LeapTest.scala +6 -6
  230. metadata +43 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4641a9164d7c10684cccf03044f43ec746c4652
4
- data.tar.gz: af6cf2aff8d93a5ec110a2c65fe5676f90e836d8
3
+ metadata.gz: f2a21bf8340d9ec5c5ee37ef6293c960edcb96a6
4
+ data.tar.gz: 19888fea6477f6e3538950844ee946deb33040b1
5
5
  SHA512:
6
- metadata.gz: ed95dff49c3c7509719cc4a8d8abfe8ef26c9f4e39869b2eccf934f077357c6d6a1446fe93433c609d8cf474a6e3756bdc26cc573aeefaac6045e13d4ceee25a
7
- data.tar.gz: 03373c698f08a120bab897e8613e7da90e00c8455044c86d774494d338e6e083308dc7fb5f8827a857e15b0989ba81422183e614787dc6e99c1e60e77252a61b
6
+ metadata.gz: 7aa55c5be13d4c3a2795304620f184f8f05c98453d6dbe6af8da4f546af39fc836bb99cc5e694a5748563625e5ca86f19635906fd9072944ec9f5f4ebff81184
7
+ data.tar.gz: 68715d7a0939dba01499480eca11259b3bb3b0497a35fc7b07dfeec70f8da13ec76489f6a41f6a58c07f7250b9f6710283075915eb400ea858dbd5fcc101324f
@@ -1,4 +1,4 @@
1
- The Greek mathematican [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for natural numbers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/Aliquot_sum). The aliquot sum is defined as the sum of the factors of a number not including the number itself. For example, the aliquot sum of 15 is (1 + 3 + 5) = 9
1
+ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for natural numbers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/Aliquot_sum). The aliquot sum is defined as the sum of the factors of a number not including the number itself. For example, the aliquot sum of 15 is (1 + 3 + 5) = 9
2
2
 
3
3
  - **Perfect**: aliquot sum = number
4
4
  - 6 is a perfect number because (1 + 2 + 3) = 6
@@ -10,4 +10,4 @@ The Greek mathematican [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) de
10
10
  - 8 is a deficient number because (1 + 2 + 4) = 7
11
11
  - Prime numbers are deficient
12
12
 
13
- Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whethether a given number is **abundant** or **deficient**.
13
+ Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "phone-number",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "cases": [
5
5
  {
6
6
  "description": "Cleanup user-entered phone numbers",
@@ -70,12 +70,6 @@
70
70
  "phrase": "123-@:!-7890",
71
71
  "expected": null
72
72
  },
73
- {
74
- "description": "invalid with right number of digits but letters mixed in",
75
- "property": "clean",
76
- "phrase": "1a2b3c4d5e6f7g8h9i0j",
77
- "expected": null
78
- },
79
73
  {
80
74
  "description": "invalid if area code does not start with 2-9",
81
75
  "property": "clean",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "tournament",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "comments": [
5
5
  "The inputs and outputs are represented as arrays of strings to",
6
6
  "improve readability in this JSON file.",
@@ -10,6 +10,101 @@
10
10
  "a single string."
11
11
  ],
12
12
  "cases": [
13
+ {
14
+ "description": "just the header if no input",
15
+ "property": "tally",
16
+ "input": [],
17
+ "expected": [ "Team | MP | W | D | L | P" ]
18
+ },
19
+ {
20
+ "description": "a win is three points, a loss is zero points",
21
+ "property": "tally",
22
+ "input": [
23
+ "Allegoric Alaskans;Blithering Badgers;win"
24
+ ],
25
+ "expected": [
26
+ "Team | MP | W | D | L | P",
27
+ "Allegoric Alaskans | 1 | 1 | 0 | 0 | 3",
28
+ "Blithering Badgers | 1 | 0 | 0 | 1 | 0"
29
+ ]
30
+ },
31
+ {
32
+ "description": "a win can also be expressed as a loss",
33
+ "property": "tally",
34
+ "input": [
35
+ "Blithering Badgers;Allegoric Alaskans;loss"
36
+ ],
37
+ "expected": [
38
+ "Team | MP | W | D | L | P",
39
+ "Allegoric Alaskans | 1 | 1 | 0 | 0 | 3",
40
+ "Blithering Badgers | 1 | 0 | 0 | 1 | 0"
41
+ ]
42
+ },
43
+ {
44
+ "description": "a different team can win",
45
+ "property": "tally",
46
+ "input": [
47
+ "Blithering Badgers;Allegoric Alaskans;win"
48
+ ],
49
+ "expected": [
50
+ "Team | MP | W | D | L | P",
51
+ "Blithering Badgers | 1 | 1 | 0 | 0 | 3",
52
+ "Allegoric Alaskans | 1 | 0 | 0 | 1 | 0"
53
+ ]
54
+ },
55
+ {
56
+ "description": "a draw is one point each",
57
+ "property": "tally",
58
+ "input": [
59
+ "Allegoric Alaskans;Blithering Badgers;draw"
60
+ ],
61
+ "expected": [
62
+ "Team | MP | W | D | L | P",
63
+ "Allegoric Alaskans | 1 | 0 | 1 | 0 | 1",
64
+ "Blithering Badgers | 1 | 0 | 1 | 0 | 1"
65
+ ]
66
+ },
67
+ {
68
+ "description": "There can be more than one match",
69
+ "property": "tally",
70
+ "input": [
71
+ "Allegoric Alaskans;Blithering Badgers;win",
72
+ "Allegoric Alaskans;Blithering Badgers;win"
73
+ ],
74
+ "expected": [
75
+ "Team | MP | W | D | L | P",
76
+ "Allegoric Alaskans | 2 | 2 | 0 | 0 | 6",
77
+ "Blithering Badgers | 2 | 0 | 0 | 2 | 0"
78
+ ]
79
+ },
80
+ {
81
+ "description": "There can be more than one winner",
82
+ "property": "tally",
83
+ "input": [
84
+ "Allegoric Alaskans;Blithering Badgers;loss",
85
+ "Allegoric Alaskans;Blithering Badgers;win"
86
+ ],
87
+ "expected": [
88
+ "Team | MP | W | D | L | P",
89
+ "Allegoric Alaskans | 2 | 1 | 0 | 1 | 3",
90
+ "Blithering Badgers | 2 | 1 | 0 | 1 | 3"
91
+ ]
92
+ },
93
+ {
94
+ "description": "There can be more than two teams",
95
+ "property": "tally",
96
+ "input": [
97
+ "Allegoric Alaskans;Blithering Badgers;win",
98
+ "Blithering Badgers;Courageous Californians;win",
99
+ "Courageous Californians;Allegoric Alaskans;loss"
100
+ ],
101
+ "expected": [
102
+ "Team | MP | W | D | L | P",
103
+ "Allegoric Alaskans | 2 | 2 | 0 | 0 | 6",
104
+ "Blithering Badgers | 2 | 1 | 0 | 1 | 3",
105
+ "Courageous Californians | 2 | 0 | 0 | 2 | 0"
106
+ ]
107
+ },
13
108
  {
14
109
  "description": "typical input",
15
110
  "property": "tally",
@@ -64,26 +159,6 @@
64
159
  "Blithering Badgers | 3 | 0 | 1 | 2 | 1",
65
160
  "Devastating Donkeys | 3 | 0 | 1 | 2 | 1"
66
161
  ]
67
- },
68
- {
69
- "comments": [
70
- "Invalid input lines in an otherwise-valid game",
71
- "still results in valid output."
72
- ],
73
- "description": "mostly invalid lines",
74
- "property": "tally",
75
- "input": [
76
- "",
77
- "Allegoric Alaskans@Blithering Badgers;draw",
78
- "Blithering Badgers;Devastating Donkeys;loss",
79
- "Devastating Donkeys;Courageous Californians;win;5",
80
- "Courageous Californians;Allegoric Alaskans;los"
81
- ],
82
- "expected": [
83
- "Team | MP | W | D | L | P",
84
- "Devastating Donkeys | 1 | 1 | 0 | 0 | 3",
85
- "Blithering Badgers | 1 | 0 | 0 | 1 | 0"
86
- ]
87
162
  }
88
163
  ]
89
164
  }
@@ -60,8 +60,3 @@ Devastating Donkeys;Courageous Californians;draw
60
60
  ```
61
61
 
62
62
  Means that the Devastating Donkeys and Courageous Californians tied.
63
-
64
- Your program should only process input lines that follow this format.
65
- All other lines should be ignored:
66
- If an input contains both valid and invalid input lines,
67
- output a table that contains just the results from the valid lines.
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.1.0.9"
2
+ VERSION = "2.1.0.10"
3
3
  end
data/tracks/coq/README.md CHANGED
@@ -6,8 +6,6 @@ Exercism exercises in Coq.
6
6
 
7
7
  ## Setup
8
8
 
9
-
10
-
11
9
  There are 2 ways to insal Coq:
12
10
 
13
11
  1. [Recommened] Using OPAM package manger: https://coq.inria.fr/opam/www/using.html
@@ -43,8 +41,11 @@ We simulate Test-Driven Development (TDD) by implementing the tests in order of
43
41
 
44
42
  Test files should use the following format:
45
43
 
46
- ```
47
- # include the body of an example test
44
+ ```Coq
45
+ Theorem TautologyExercise: True.
46
+ Proof.
47
+ (* Add your proof here *)
48
+ Qed.
48
49
  ```
49
50
 
50
51
  ## Submitting a Pull Request ##
@@ -65,16 +66,13 @@ Please keep the following in mind:
65
66
 
66
67
  ## Contributing a New Exercise ##
67
68
 
68
- - All Exercism exercises must be defined in [x-common](https://github.com/exercism/x-common/tree/master/exercises) before they are implemented for a specific track. Please submit a PR there if your exercise is new to Exercism.
69
-
70
69
  - Please make sure the new exercise conforms to specifications in the [exercism/x-common](https://github.com/exercism/x-common) repo.
71
70
 
72
71
  - Each exercise must stand on its own. Do not reference files outside the exercise directory. They will not be included when the user fetches the exercise.
73
72
 
74
73
  - Exercises should use only the Coq core libraries.
75
74
 
76
- - Please do not add a README or README.md file to the exercise directory. The READMEs are constructed using shared metadata, which lives in the
77
- [exercism/x-common](https://github.com/exercism/x-common) repository. Further explanation can be found in [fixing-exercise-readmes](https://github.com/exercism/exercism.io/blob/master/docs/fixing-exercise-readmes.md)
75
+ - Please do not add a README or README.md file to the exercise directory. The READMEs are constructed using shared metadata. Further explanation can be found in [fixing-exercise-readmes](https://github.com/exercism/exercism.io/blob/master/docs/fixing-exercise-readmes.md)
78
76
 
79
77
  - Each exercise should have a test suite, an example solution, a template file for the real implementation and ... (anything else that needs to go with each exercise for this track). The CI build expects files to be named using the following convention: (describe the Coq convention for naming the various files that make up an exercise).
80
78
 
@@ -0,0 +1,3 @@
1
+ Require Import Coq.Strings.String.
2
+
3
+ Definition hello:string := "Hello, World!".
@@ -0,0 +1,3 @@
1
+ Require Import Coq.Strings.String.
2
+
3
+ Definition hello:string := (* add your definition here *).
@@ -0,0 +1,4 @@
1
+ (* Type definitions *)
2
+
3
+ Inductive DNA := dA | dC | dG | dT.
4
+ Inductive RNA := rA | rC | rG | rU.
@@ -0,0 +1,15 @@
1
+ Require Import Coq.Lists.List.
2
+
3
+ Definition to_rna: list DNA -> list RNA
4
+ := map (fun x => match x with
5
+ | dG => rC
6
+ | dC => rG
7
+ | dT => rA
8
+ | dA => rU
9
+ end).
10
+
11
+
12
+ (* TEST:
13
+ Import ListNotations.
14
+ Compute to_rna [dA ; dG].
15
+ *)
@@ -0,0 +1,5 @@
1
+ Require Import DNA.
2
+
3
+ Definition to_rna: list DNA -> list RNA :=
4
+ (* Add your definition here *)
5
+ .
@@ -0,0 +1 @@
1
+ Let us start by proving something we already know is true.
@@ -0,0 +1,4 @@
1
+ Theorem TautologyExercise: True.
2
+ Proof.
3
+ tauto.
4
+ Qed.
@@ -0,0 +1,4 @@
1
+ Theorem TautologyExercise: True.
2
+ Proof.
3
+ (* Add your proof here *)
4
+ Qed.
@@ -1,4 +1,5 @@
1
1
  name: accumulate
2
+ version: 0.1.0.1
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -10,9 +10,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
10
10
  specs :: Spec
11
11
  specs = describe "accumulate" $ do
12
12
 
13
- -- As of 2016-07-27, there was no reference file
14
- -- for the test cases in `exercism/x-common`.
15
-
16
13
  let square x = x * x :: Int
17
14
 
18
15
  it "empty accumulation" $
@@ -1,4 +1,5 @@
1
1
  name: acronym
2
+ version: 1.0.0.1
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -15,11 +15,6 @@ specs = describe "acronym" $
15
15
  where
16
16
  test Case {..} = it description $ abbreviate input `shouldBe` expected
17
17
 
18
- -- Adapted from
19
- -- Source: exercism/x-common/exercises/acronym/canonical-data.json
20
- -- Version: 1.0.0
21
- -- Date: 2017-03-31
22
-
23
18
  data Case = Case { description :: String
24
19
  , input :: String
25
20
  , expected :: String
@@ -1,4 +1,5 @@
1
1
  name: all-your-base
2
+ version: 0.9.0.1 # 2016-06-29
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -19,8 +19,6 @@ specs = describe "all-your-base" $
19
19
  assertion = expression `shouldBe` outputDigits
20
20
  expression = rebase inputBase outputBase inputDigits
21
21
 
22
- -- Test cases adapted from `exercism/x-common/all-your-base.json` on 2016-06-29.
23
-
24
22
  data Case = Case { description :: String
25
23
  , inputBase :: Integer
26
24
  , inputDigits :: [Integer]
@@ -1,4 +1,5 @@
1
1
  name: allergies
2
+ version: 0.9.0.1 # 2016-08-01
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -23,8 +23,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
23
23
  specs :: Spec
24
24
  specs = describe "allergies" $ do
25
25
 
26
- -- Test cases adapted from `exercism/x-common/allergies.json` on 2016-08-01.
27
-
28
26
  describe "isAllergicTo" $ do
29
27
 
30
28
  it "no allergies means not allergic" $ do
@@ -1,4 +1,5 @@
1
1
  name: alphametics
2
+ version: 0.9.0.1 # 2016-10-26
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -21,8 +21,6 @@ specs = describe "alphametics" $
21
21
  shouldMatchSolution = shouldBe `on` fmap sort
22
22
  assertion = solve puzzle `shouldMatchSolution` expected
23
23
 
24
- -- Test cases adapted from `exercism/x-common/exercises/alphametics/canonical-data.json` on 2016-10-26.
25
-
26
24
  data Case = Case { description :: String
27
25
  , puzzle :: String
28
26
  , expected :: Maybe[(Char, Int)]
@@ -1,4 +1,5 @@
1
1
  name: anagram
2
+ version: 0.9.0.1 # 2016-10-26
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -24,8 +24,6 @@ specs = describe "anagram" $
24
24
  . map fromList
25
25
  $ candidates
26
26
 
27
- -- Test cases adapted from `exercism/x-common` on 2016-10-26.
28
-
29
27
  data Case = Case { description :: String
30
28
  , subject :: String
31
29
  , candidates :: [String]
@@ -1,4 +1,5 @@
1
1
  name: atbash-cipher
2
+ version: 0.9.0.1 # 2017-02-01
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -16,8 +16,6 @@ specs = describe "atbash-cipher" $ do
16
16
  where
17
17
  test f Case{..} = it description $ f phrase `shouldBe` expected
18
18
 
19
- -- Test cases adapted from `exercism/x-common/atbash-cipher.json` on 2017-02-01.
20
-
21
19
  data Case = Case { description :: String
22
20
  , phrase :: String
23
21
  , expected :: String
@@ -1,4 +1,5 @@
1
1
  name: bank-account
2
+ version: 0.1.0.1
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -17,9 +17,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
17
17
  specs :: Spec
18
18
  specs = describe "bank-account" $ do
19
19
 
20
- -- As of 2016-08-01, there was no reference file
21
- -- for the test cases in `exercism/x-common`.
22
-
23
20
  it "initial balance is 0" $ do
24
21
  account <- openAccount
25
22
  getBalance account `shouldReturn` Just 0
@@ -1,4 +1,5 @@
1
1
  name: beer-song
2
+ version: 0.1.0.1
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -1,4 +1,5 @@
1
1
  name: binary
2
+ version: 0.9.0.1 # 2016-07-26
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -19,7 +19,6 @@ specs = describe "binary" $
19
19
  where
20
20
  assertion = toDecimal binary `shouldBe` fromIntegral expected
21
21
 
22
- -- Test cases adapted from `exercism/x-common/binary.json` on 2016-07-26.
23
22
  -- Some descriptions mentioning "errors" where changed to avoid confusion.
24
23
 
25
24
  data Case = Case { description :: String
@@ -1,4 +1,5 @@
1
1
  name: binary-search-tree
2
+ version: 0.1.0.1
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -18,9 +18,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
18
18
  specs :: Spec
19
19
  specs = describe "binary-seach-tree" $ do
20
20
 
21
- -- As of 2016-08-03, there was no reference file
22
- -- for the test cases in `exercism/x-common`.
23
-
24
21
  let int4 = 4 :: Int
25
22
  let noInts = [] :: [Int]
26
23
 
@@ -1,4 +1,5 @@
1
1
  name: bob
2
+ version: 0.9.0.1 # 2016-11-29
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -15,8 +15,6 @@ specs = describe "bob" $
15
15
  where
16
16
  test Case{..} = it description $ responseFor input `shouldBe` expected
17
17
 
18
- -- Test cases adapted from `exercism/x-common/bob.json` on 2016-11-29.
19
-
20
18
  data Case = Case { description :: String
21
19
  , input :: String
22
20
  , expected :: String
@@ -1,4 +1,5 @@
1
1
  name: bowling
2
+ version: 0.9.0.1 # 2016-11-20
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -19,8 +19,6 @@ specs = describe "bowling" $
19
19
  assertion = result `shouldBe` expected
20
20
  result = score rolls
21
21
 
22
- -- Test cases adapted from `exercism/x-common/bowling` on 2016-11-20.
23
-
24
22
  data Case = Case { description :: String
25
23
  , rolls :: [Int]
26
24
  , expected :: Either BowlingError Int
@@ -1,4 +1,5 @@
1
1
  name: bracket-push
2
+ version: 1.1.0.1
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -11,15 +11,10 @@ main = hspecWith defaultConfig {configFastFail = True} specs
11
11
 
12
12
  specs :: Spec
13
13
  specs = describe "bracket-push" $
14
- describe "isPaired" $ for_ cases test
14
+ describe "arePaired" $ for_ cases test
15
15
  where
16
16
  test Case{..} = it description $ arePaired input `shouldBe` expected
17
17
 
18
- -- Adapted from
19
- -- Source: exercism/x-common/exercises/bracket-push/canonical-data.json
20
- -- Version: 1.1.0
21
- -- Date: 2017-04-07.
22
-
23
18
  data Case = Case { description :: String
24
19
  , input :: String
25
20
  , expected :: Bool
@@ -1,4 +1,5 @@
1
1
  name: change
2
+ version: 0.9.0.1 # 2016-09-17
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -20,8 +20,6 @@ specs = describe "Change" $
20
20
  assertion = expression `shouldBe` expected
21
21
  expression = sort <$> findFewestCoins target coins
22
22
 
23
- -- Test cases adapted from `exercism/x-common` on 2016-09-17.
24
-
25
23
  data Case = Case { description :: String
26
24
  , coins :: [Integer]
27
25
  , target :: Integer
@@ -1,4 +1,5 @@
1
1
  name: clock
2
+ version: 0.9.0.1 # 2016-03-29
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -25,8 +25,6 @@ specs = describe "clock" $ do
25
25
  it "negate works" $
26
26
  negate (fromHourMin 23 55) `shouldBe` 5
27
27
 
28
- -- Test cases extracted from x-common/clock.json from 2016-03-29
29
-
30
28
  describe "standard tests" $ do
31
29
 
32
30
  describe "create" $ for_ createCases createTest
@@ -1,4 +1,5 @@
1
1
  name: connect
2
+ version: 0.9.0.1 # 2016-09-16
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -19,8 +19,6 @@ specs = describe "connect" $
19
19
  assertion = winner testBoard `shouldBe` expected
20
20
  testBoard = filter (/=' ') <$> board
21
21
 
22
- -- Test cases adapted from `exercism/x-common` on 2016-09-16.
23
-
24
22
  data Case = Case { description :: String
25
23
  , board :: [String]
26
24
  , expected :: Maybe Mark
@@ -1,4 +1,5 @@
1
1
  name: crypto-square
2
+ version: 0.1.0.1
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -26,8 +26,6 @@ specs = describe "crypto-square" $
26
26
  it "reorders the characters" $ encode input `shouldMatchString` expected
27
27
  it "groups the output" $ encode input `shouldMatchWords` expected
28
28
 
29
- -- Test cases created from scratch on 2016-10-05, diverging from `x-common`.
30
-
31
29
  data Case = Case { description :: String
32
30
  , input :: String
33
31
  , expected :: String
@@ -1,4 +1,5 @@
1
1
  name: custom-set
2
+ version: 0.9.0.1 # 2016-09-03
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -29,9 +29,6 @@ specs = describe "custom-set" $ do
29
29
 
30
30
  describe "standard tests" $ do
31
31
 
32
- -- Test cases adapted from `exercism/x-common/custom-set.json`
33
- -- on 2016-09-03.
34
-
35
32
  describe "null" $ do
36
33
 
37
34
  it "sets with no elements are empty" $
@@ -1,4 +1,5 @@
1
1
  name: difference-of-squares
2
+ version: 0.9.0.1 # 2016-08-03
2
3
 
3
4
  dependencies:
4
5
  - base
@@ -11,9 +11,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
11
11
  specs :: Spec
12
12
  specs = describe "differenceOfSquares" $ do
13
13
 
14
- -- Test cases adapted from `exercism/x-common/difference-of-squares.json`
15
- -- on 2016-08-03.
16
-
17
14
  describe "squareOfSums" $ do
18
15
  it "square of sum 5" $ squareOfSums 5 `shouldBe` 225
19
16
  it "square of sum 10" $ squareOfSums 10 `shouldBe` 3025