trackler 2.2.1.85 → 2.2.1.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/alphametics/canonical-data.json +29 -11
  4. data/problem-specifications/exercises/binary-search-tree/canonical-data.json +177 -0
  5. data/problem-specifications/package.json +2 -2
  6. data/problem-specifications/yarn.lock +61 -51
  7. data/tracks/bash/CONTRIBUTING.md +10 -6
  8. data/tracks/bash/README.md +1 -0
  9. data/tracks/bash/exercises/acronym/README.md +1 -1
  10. data/tracks/bash/exercises/anagram/README.md +1 -1
  11. data/tracks/bash/exercises/anagram/{anagram_tests.sh → anagram_test.sh} +0 -0
  12. data/tracks/bash/exercises/armstrong-numbers/armstrong_numbers_test.sh +25 -17
  13. data/tracks/bash/exercises/armstrong-numbers/example.sh +18 -12
  14. data/tracks/bash/exercises/atbash-cipher/README.md +1 -1
  15. data/tracks/bash/exercises/atbash-cipher/{atbash_cipher_tests.sh → atbash_cipher_test.sh} +0 -0
  16. data/tracks/bash/exercises/difference-of-squares/README.md +1 -1
  17. data/tracks/bash/exercises/gigasecond/README.md +1 -1
  18. data/tracks/bash/exercises/hamming/README.md +1 -1
  19. data/tracks/bash/exercises/hello-world/README.md +1 -1
  20. data/tracks/bash/exercises/leap/README.md +1 -1
  21. data/tracks/bash/exercises/luhn/README.md +1 -1
  22. data/tracks/bash/exercises/nucleotide-count/README.md +1 -1
  23. data/tracks/bash/exercises/pangram/README.md +1 -1
  24. data/tracks/bash/exercises/pangram/{pangram_tests.sh → pangram_test.sh} +0 -0
  25. data/tracks/bash/exercises/phone-number/README.md +1 -1
  26. data/tracks/bash/exercises/phone-number/{phone_number_tests.sh → phone_number_test.sh} +0 -0
  27. data/tracks/bash/exercises/raindrops/README.md +1 -1
  28. data/tracks/bash/exercises/rna-transcription/README.md +1 -1
  29. data/tracks/bash/exercises/triangle/example.sh +23 -4
  30. data/tracks/bash/exercises/triangle/triangle_test.sh +17 -0
  31. data/tracks/bash/exercises/two-fer/README.md +1 -1
  32. data/tracks/bash/exercises/word-count/README.md +1 -1
  33. data/tracks/c/config.json +11 -0
  34. data/tracks/c/exercises/complex-numbers/README.md +67 -0
  35. data/tracks/c/exercises/complex-numbers/makefile +27 -0
  36. data/tracks/c/exercises/complex-numbers/src/complex_numbers.c +46 -0
  37. data/tracks/c/exercises/complex-numbers/src/complex_numbers.h +19 -0
  38. data/tracks/c/exercises/complex-numbers/src/example.c +80 -0
  39. data/tracks/c/exercises/complex-numbers/test/test_complex_numbers.c +397 -0
  40. data/tracks/c/exercises/complex-numbers/test/vendor/unity.c +1300 -0
  41. data/tracks/c/exercises/complex-numbers/test/vendor/unity.h +274 -0
  42. data/tracks/c/exercises/complex-numbers/test/vendor/unity_internals.h +701 -0
  43. data/tracks/crystal/.github/stale.yml +18 -0
  44. data/tracks/csharp/exercises/bob/README.md +3 -2
  45. data/tracks/ecmascript/config.json +4 -4
  46. data/tracks/fsharp/exercises/bob/README.md +4 -2
  47. data/tracks/fsharp/exercises/react/ReactTest.fs +137 -74
  48. data/tracks/fsharp/generators/Generators.fs +76 -0
  49. data/tracks/go/exercises/tree-building/tree_test.go +15 -0
  50. data/tracks/haskell/.travis.yml +1 -1
  51. data/tracks/haskell/exercises/accumulate/stack.yaml +1 -1
  52. data/tracks/haskell/exercises/acronym/package.yaml +1 -1
  53. data/tracks/haskell/exercises/acronym/stack.yaml +1 -1
  54. data/tracks/haskell/exercises/all-your-base/package.yaml +1 -1
  55. data/tracks/haskell/exercises/all-your-base/stack.yaml +1 -1
  56. data/tracks/haskell/exercises/all-your-base/test/Tests.hs +6 -6
  57. data/tracks/haskell/exercises/allergies/package.yaml +1 -1
  58. data/tracks/haskell/exercises/allergies/stack.yaml +1 -1
  59. data/tracks/haskell/exercises/alphametics/stack.yaml +1 -1
  60. data/tracks/haskell/exercises/anagram/package.yaml +1 -1
  61. data/tracks/haskell/exercises/anagram/stack.yaml +1 -1
  62. data/tracks/haskell/exercises/atbash-cipher/package.yaml +1 -1
  63. data/tracks/haskell/exercises/atbash-cipher/stack.yaml +1 -1
  64. data/tracks/haskell/exercises/bank-account/stack.yaml +1 -1
  65. data/tracks/haskell/exercises/beer-song/stack.yaml +1 -1
  66. data/tracks/haskell/exercises/binary-search-tree/package.yaml +1 -1
  67. data/tracks/haskell/exercises/binary-search-tree/stack.yaml +1 -1
  68. data/tracks/haskell/exercises/binary-search-tree/test/Tests.hs +3 -0
  69. data/tracks/haskell/exercises/binary/stack.yaml +1 -1
  70. data/tracks/haskell/exercises/bob/package.yaml +1 -1
  71. data/tracks/haskell/exercises/bob/stack.yaml +1 -1
  72. data/tracks/haskell/exercises/bowling/stack.yaml +1 -1
  73. data/tracks/haskell/exercises/bracket-push/package.yaml +1 -1
  74. data/tracks/haskell/exercises/bracket-push/stack.yaml +1 -1
  75. data/tracks/haskell/exercises/change/package.yaml +1 -1
  76. data/tracks/haskell/exercises/change/stack.yaml +1 -1
  77. data/tracks/haskell/exercises/clock/stack.yaml +1 -1
  78. data/tracks/haskell/exercises/collatz-conjecture/package.yaml +1 -1
  79. data/tracks/haskell/exercises/collatz-conjecture/stack.yaml +1 -1
  80. data/tracks/haskell/exercises/complex-numbers/stack.yaml +1 -1
  81. data/tracks/haskell/exercises/connect/package.yaml +1 -1
  82. data/tracks/haskell/exercises/connect/stack.yaml +1 -1
  83. data/tracks/haskell/exercises/crypto-square/package.yaml +1 -1
  84. data/tracks/haskell/exercises/crypto-square/stack.yaml +1 -1
  85. data/tracks/haskell/exercises/custom-set/stack.yaml +1 -1
  86. data/tracks/haskell/exercises/diamond/package.yaml +1 -1
  87. data/tracks/haskell/exercises/diamond/stack.yaml +1 -1
  88. data/tracks/haskell/exercises/difference-of-squares/package.yaml +1 -1
  89. data/tracks/haskell/exercises/difference-of-squares/stack.yaml +1 -1
  90. data/tracks/haskell/exercises/dominoes/package.yaml +1 -1
  91. data/tracks/haskell/exercises/dominoes/stack.yaml +1 -1
  92. data/tracks/haskell/exercises/etl/stack.yaml +1 -1
  93. data/tracks/haskell/exercises/food-chain/stack.yaml +1 -1
  94. data/tracks/haskell/exercises/forth/stack.yaml +1 -1
  95. data/tracks/haskell/exercises/gigasecond/stack.yaml +1 -1
  96. data/tracks/haskell/exercises/go-counting/stack.yaml +1 -1
  97. data/tracks/haskell/exercises/grade-school/stack.yaml +1 -1
  98. data/tracks/haskell/exercises/grains/stack.yaml +1 -1
  99. data/tracks/haskell/exercises/hamming/stack.yaml +1 -1
  100. data/tracks/haskell/exercises/hello-world/stack.yaml +1 -1
  101. data/tracks/haskell/exercises/hexadecimal/stack.yaml +1 -1
  102. data/tracks/haskell/exercises/house/stack.yaml +1 -1
  103. data/tracks/haskell/exercises/isbn-verifier/examples/success-standard/src/IsbnVerifier.hs +1 -0
  104. data/tracks/haskell/exercises/isbn-verifier/package.yaml +1 -1
  105. data/tracks/haskell/exercises/isbn-verifier/stack.yaml +1 -1
  106. data/tracks/haskell/exercises/isbn-verifier/test/Tests.hs +4 -0
  107. data/tracks/haskell/exercises/isogram/stack.yaml +1 -1
  108. data/tracks/haskell/exercises/kindergarten-garden/stack.yaml +1 -1
  109. data/tracks/haskell/exercises/largest-series-product/stack.yaml +1 -1
  110. data/tracks/haskell/exercises/leap/stack.yaml +1 -1
  111. data/tracks/haskell/exercises/lens-person/stack.yaml +1 -1
  112. data/tracks/haskell/exercises/linked-list/stack.yaml +1 -1
  113. data/tracks/haskell/exercises/list-ops/stack.yaml +1 -1
  114. data/tracks/haskell/exercises/luhn/package.yaml +1 -1
  115. data/tracks/haskell/exercises/luhn/stack.yaml +1 -1
  116. data/tracks/haskell/exercises/luhn/test/Tests.hs +1 -1
  117. data/tracks/haskell/exercises/matrix/stack.yaml +1 -1
  118. data/tracks/haskell/exercises/meetup/package.yaml +1 -1
  119. data/tracks/haskell/exercises/meetup/stack.yaml +1 -1
  120. data/tracks/haskell/exercises/minesweeper/stack.yaml +1 -1
  121. data/tracks/haskell/exercises/nth-prime/stack.yaml +1 -1
  122. data/tracks/haskell/exercises/nucleotide-count/stack.yaml +1 -1
  123. data/tracks/haskell/exercises/ocr-numbers/stack.yaml +1 -1
  124. data/tracks/haskell/exercises/octal/stack.yaml +1 -1
  125. data/tracks/haskell/exercises/palindrome-products/stack.yaml +1 -1
  126. data/tracks/haskell/exercises/pangram/stack.yaml +1 -1
  127. data/tracks/haskell/exercises/parallel-letter-frequency/stack.yaml +1 -1
  128. data/tracks/haskell/exercises/pascals-triangle/stack.yaml +1 -1
  129. data/tracks/haskell/exercises/perfect-numbers/stack.yaml +1 -1
  130. data/tracks/haskell/exercises/phone-number/stack.yaml +1 -1
  131. data/tracks/haskell/exercises/pig-latin/stack.yaml +1 -1
  132. data/tracks/haskell/exercises/pov/stack.yaml +1 -1
  133. data/tracks/haskell/exercises/prime-factors/stack.yaml +1 -1
  134. data/tracks/haskell/exercises/pythagorean-triplet/stack.yaml +1 -1
  135. data/tracks/haskell/exercises/queen-attack/stack.yaml +1 -1
  136. data/tracks/haskell/exercises/rail-fence-cipher/package.yaml +1 -1
  137. data/tracks/haskell/exercises/rail-fence-cipher/stack.yaml +1 -1
  138. data/tracks/haskell/exercises/raindrops/stack.yaml +1 -1
  139. data/tracks/haskell/exercises/rna-transcription/package.yaml +1 -1
  140. data/tracks/haskell/exercises/rna-transcription/stack.yaml +1 -1
  141. data/tracks/haskell/exercises/rna-transcription/test/Tests.hs +0 -12
  142. data/tracks/haskell/exercises/robot-name/stack.yaml +1 -1
  143. data/tracks/haskell/exercises/robot-simulator/stack.yaml +1 -1
  144. data/tracks/haskell/exercises/roman-numerals/stack.yaml +1 -1
  145. data/tracks/haskell/exercises/rotational-cipher/stack.yaml +1 -1
  146. data/tracks/haskell/exercises/run-length-encoding/stack.yaml +1 -1
  147. data/tracks/haskell/exercises/saddle-points/stack.yaml +1 -1
  148. data/tracks/haskell/exercises/say/stack.yaml +1 -1
  149. data/tracks/haskell/exercises/scrabble-score/stack.yaml +1 -1
  150. data/tracks/haskell/exercises/secret-handshake/stack.yaml +1 -1
  151. data/tracks/haskell/exercises/series/stack.yaml +1 -1
  152. data/tracks/haskell/exercises/sgf-parsing/stack.yaml +1 -1
  153. data/tracks/haskell/exercises/sieve/stack.yaml +1 -1
  154. data/tracks/haskell/exercises/simple-cipher/stack.yaml +1 -1
  155. data/tracks/haskell/exercises/simple-linked-list/stack.yaml +1 -1
  156. data/tracks/haskell/exercises/space-age/stack.yaml +1 -1
  157. data/tracks/haskell/exercises/spiral-matrix/stack.yaml +1 -1
  158. data/tracks/haskell/exercises/strain/stack.yaml +1 -1
  159. data/tracks/haskell/exercises/sublist/stack.yaml +1 -1
  160. data/tracks/haskell/exercises/sum-of-multiples/stack.yaml +1 -1
  161. data/tracks/haskell/exercises/triangle/stack.yaml +1 -1
  162. data/tracks/haskell/exercises/trinary/stack.yaml +1 -1
  163. data/tracks/haskell/exercises/twelve-days/stack.yaml +1 -1
  164. data/tracks/haskell/exercises/word-count/stack.yaml +1 -1
  165. data/tracks/haskell/exercises/wordy/stack.yaml +1 -1
  166. data/tracks/haskell/exercises/zebra-puzzle/stack.yaml +1 -1
  167. data/tracks/haskell/exercises/zipper/stack.yaml +1 -1
  168. data/tracks/java/config.json +12 -0
  169. data/tracks/java/exercises/alphametics/.meta/src/reference/java/Alphametics.java +125 -0
  170. data/tracks/java/exercises/alphametics/.meta/src/reference/java/UnsolvablePuzzleException.java +2 -0
  171. data/tracks/java/exercises/alphametics/.meta/src/version +1 -0
  172. data/tracks/java/exercises/alphametics/README.md +47 -0
  173. data/tracks/java/exercises/alphametics/build.gradle +18 -0
  174. data/tracks/java/exercises/alphametics/src/main/java/.keep +0 -0
  175. data/tracks/java/exercises/alphametics/src/main/java/UnsolvablePuzzleException.java +2 -0
  176. data/tracks/java/exercises/alphametics/src/test/java/AlphameticsTest.java +150 -0
  177. data/tracks/java/exercises/beer-song/.meta/src/reference/java/BeerSong.java +5 -4
  178. data/tracks/java/exercises/beer-song/.meta/version +1 -0
  179. data/tracks/java/exercises/beer-song/src/test/java/BeerSongTest.java +24 -16
  180. data/tracks/java/exercises/binary-search/.meta/version +1 -0
  181. data/tracks/java/exercises/book-store/.meta/version +1 -0
  182. data/tracks/java/exercises/book-store/src/test/java/BookStoreTest.java +15 -8
  183. data/tracks/java/exercises/circular-buffer/.meta/version +1 -0
  184. data/tracks/java/exercises/list-ops/.meta/version +1 -1
  185. data/tracks/java/exercises/list-ops/src/test/java/ListOpsTest.java +1 -1
  186. data/tracks/java/exercises/nth-prime/.meta/version +1 -0
  187. data/tracks/java/exercises/settings.gradle +1 -0
  188. data/tracks/java/exercises/tournament/.meta/version +1 -0
  189. data/tracks/java/exercises/transpose/.meta/version +1 -0
  190. data/tracks/java/exercises/transpose/src/test/java/TransposeTest.java +29 -74
  191. data/tracks/java/exercises/wordy/.meta/version +1 -0
  192. data/tracks/javascript/.eslintignore +0 -1
  193. data/tracks/javascript/config.json +13 -3
  194. data/tracks/javascript/exercises/bowling/example.js +24 -10
  195. data/tracks/javascript/exercises/forth/README.md +56 -0
  196. data/tracks/javascript/exercises/forth/example.js +66 -0
  197. data/tracks/javascript/exercises/forth/forth.spec.js +259 -0
  198. data/tracks/lua/config.json +92 -81
  199. data/tracks/lua/exercises/accumulate/README.md +42 -0
  200. data/tracks/lua/exercises/beer-song/README.md +1 -1
  201. data/tracks/lua/exercises/bob/README.md +2 -0
  202. data/tracks/lua/exercises/crypto-square/README.md +6 -4
  203. data/tracks/lua/exercises/house/README.md +1 -1
  204. data/tracks/lua/exercises/isbn-verifier/README.md +25 -20
  205. data/tracks/lua/exercises/kindergarten-garden/README.md +3 -3
  206. data/tracks/lua/exercises/meetup/README.md +16 -12
  207. data/tracks/lua/exercises/nucleotide-count/README.md +2 -2
  208. data/tracks/lua/exercises/phone-number/README.md +1 -1
  209. data/tracks/lua/exercises/pov/README.md +0 -2
  210. data/tracks/lua/exercises/queen-attack/README.md +22 -22
  211. data/tracks/lua/exercises/rectangles/README.md +9 -9
  212. data/tracks/lua/exercises/reverse-string/README.md +23 -0
  213. data/tracks/lua/exercises/reverse-string/example.lua +7 -0
  214. data/tracks/lua/exercises/reverse-string/reverse-string_spec.lua +24 -0
  215. data/tracks/lua/exercises/secret-handshake/README.md +1 -1
  216. data/tracks/lua/exercises/space-age/README.md +1 -2
  217. data/tracks/lua/exercises/sum-of-multiples/README.md +3 -3
  218. data/tracks/perl6/exercises/two-fer/README.md +1 -1
  219. data/tracks/python/exercises/luhn/luhn_test.py +1 -1
  220. metadata +39 -6
@@ -0,0 +1,56 @@
1
+ Implement an evaluator for a very simple subset of Forth.
2
+
3
+ [Forth](https://en.wikipedia.org/wiki/Forth_%28programming_language%29)
4
+ is a stack-based programming language. Implement a very basic evaluator
5
+ for a small subset of Forth.
6
+
7
+ Your evaluator has to support the following words:
8
+
9
+ - `+`, `-`, `*`, `/` (integer arithmetic)
10
+ - `DUP`, `DROP`, `SWAP`, `OVER` (stack manipulation)
11
+
12
+ Your evaluator also has to support defining new words using the
13
+ customary syntax: `: word-name definition ;`.
14
+
15
+ To keep things simple the only data type you need to support is signed
16
+ integers of at least 16 bits size.
17
+
18
+ You should use the following rules for the syntax: a number is a
19
+ sequence of one or more (ASCII) digits, a word is a sequence of one or
20
+ more letters, digits, symbols or punctuation that is not a number.
21
+ (Forth probably uses slightly different rules, but this is close
22
+ enough.)
23
+
24
+ Words are case-insensitive.
25
+
26
+ ## Setup
27
+
28
+ Go through the setup instructions for JavaScript to
29
+ install the necessary dependencies:
30
+
31
+ http://exercism.io/languages/javascript/installation
32
+
33
+ ## Making the Test Suite Pass
34
+
35
+ Execute the tests with:
36
+
37
+ jasmine <exercise-name>.spec.js
38
+
39
+ Replace `<exercise-name>` with the name of the current exercise. E.g., to
40
+ test the Hello World exercise:
41
+
42
+ jasmine hello-world.spec.js
43
+
44
+ In many test suites all but the first test have been skipped.
45
+
46
+ Once you get a test passing, you can unskip the next one by
47
+ changing `xit` to `it`.
48
+
49
+ ## Source
50
+
51
+ Wikipedia
52
+ [Stack-oriented programming language](https://en.wikipedia.org/wiki/Stack-oriented_programming_language)
53
+ [Forth programming language](https://en.wikipedia.org/wiki/Forth_(programming_language))
54
+
55
+ ## Submitting Incomplete Solutions
56
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -0,0 +1,66 @@
1
+ var Forth = function () {
2
+ this.stack = [];
3
+ this.commands = Forth.basicCommands();
4
+ };
5
+
6
+ Forth.prototype.evaluate = function (program) {
7
+ var words = program.toLowerCase().split(' ');
8
+
9
+ for (var t = 0; t < words.length; t++) {
10
+ var word = words[t];
11
+
12
+ if (/^-?\d+$/.test(word)) {
13
+ // numbers
14
+ this.stack.push(Number(word));
15
+ } else if (word === ':') {
16
+ // word definition
17
+ var semicolon = words.indexOf(';', t);
18
+ if (semicolon === -1) throw new Error('Unterminated definition');
19
+ this.defineCommand(words[t + 1], words.slice(t + 2, semicolon).join(' '));
20
+ t = semicolon;
21
+ } else {
22
+ // commands
23
+ var command = this.commands[word];
24
+ if (!command) throw new Error('Unknown command');
25
+ this.performCommand(command);
26
+ }
27
+ }
28
+ };
29
+
30
+ Forth.prototype.defineCommand = function (word, subprogram) {
31
+ if (Forth.isKeyword(word)) throw new Error('Invalid definition');
32
+ this.commands[word] = {
33
+ arity: 0, // handled inside the call
34
+ execute: this.evaluate.bind(this, subprogram)
35
+ };
36
+ };
37
+
38
+ Forth.prototype.performCommand = function (command) {
39
+ if (command.arity > this.stack.length) throw new Error('Stack empty');
40
+
41
+ var args = this.stack.splice(this.stack.length - command.arity);
42
+ var vals = command.execute.apply(this, args);
43
+ this.stack.push.apply(this.stack, vals);
44
+ };
45
+
46
+ Forth.isKeyword = function (word) {
47
+ return word === ':' || word === ';' || /^-?\d+$/.test(word);
48
+ };
49
+
50
+ Forth.basicCommands = function () {
51
+ return {
52
+ '+': { arity: 2, execute: function (a, b) { return [a + b]; } },
53
+ '-': { arity: 2, execute: function (a, b) { return [a - b]; } },
54
+ '*': { arity: 2, execute: function (a, b) { return [a * b]; } },
55
+ '/': { arity: 2, execute: function (a, b) {
56
+ if (b === 0) throw new Error('Division by zero');
57
+ return [Math.floor(a / b)];
58
+ } },
59
+ dup: { arity: 1, execute: function (a) { return [a, a]; } },
60
+ drop: { arity: 1, execute: function () {} },
61
+ swap: { arity: 2, execute: function (a, b) { return [b, a]; } },
62
+ over: { arity: 2, execute: function (a, b) { return [a, b, a]; } }
63
+ };
64
+ };
65
+
66
+ module.exports = Forth;
@@ -0,0 +1,259 @@
1
+ var Forth = require('./forth');
2
+
3
+ describe('Forth', function () {
4
+ var forth;
5
+
6
+ beforeEach(function () {
7
+ forth = new Forth();
8
+ });
9
+
10
+ describe('parsing and numbers', function () {
11
+ it('just pushes numbers onto the stack', function () {
12
+ forth.evaluate('1 2 3 4 5');
13
+ expect(forth.stack).toEqual([1, 2, 3, 4, 5]);
14
+ });
15
+ xit('pushes negative numbers onto the stack', function () {
16
+ forth.evaluate('-1 -2 -3 -4 -5');
17
+ expect(forth.stack).toEqual([-1, -2, -3, -4, -5]);
18
+ });
19
+ });
20
+
21
+ describe('addition', function () {
22
+ xit('can add two numbers', function () {
23
+ forth.evaluate('1 2 +');
24
+ expect(forth.stack).toEqual([3]);
25
+ });
26
+ xit('errors if there is only one value on the stack', function () {
27
+ expect(function () {
28
+ forth.evaluate('1 +');
29
+ }).toThrow(new Error('Stack empty'));
30
+ });
31
+ xit('errors if there is nothing on the stack', function () {
32
+ expect(function () {
33
+ forth.evaluate('+');
34
+ }).toThrow(new Error('Stack empty'));
35
+ });
36
+ });
37
+
38
+ describe('subtraction', function () {
39
+ xit('can subtract two numbers', function () {
40
+ forth.evaluate('3 4 -');
41
+ expect(forth.stack).toEqual([-1]);
42
+ });
43
+ xit('errors if there is only one value on the stack', function () {
44
+ expect(function () {
45
+ forth.evaluate('1 -');
46
+ }).toThrow(new Error('Stack empty'));
47
+ });
48
+ xit('errors if there is nothing on the stack', function () {
49
+ expect(function () {
50
+ forth.evaluate('-');
51
+ }).toThrow(new Error('Stack empty'));
52
+ });
53
+ });
54
+
55
+ describe('multiplication', function () {
56
+ xit('can multiply two numbers', function () {
57
+ forth.evaluate('2 4 *');
58
+ expect(forth.stack).toEqual([8]);
59
+ });
60
+ xit('errors if there is only one value on the stack', function () {
61
+ expect(function () {
62
+ forth.evaluate('1 *');
63
+ }).toThrow(new Error('Stack empty'));
64
+ });
65
+ xit('errors if there is nothing on the stack', function () {
66
+ expect(function () {
67
+ forth.evaluate('*');
68
+ }).toThrow(new Error('Stack empty'));
69
+ });
70
+ });
71
+
72
+ describe('division', function () {
73
+ xit('can divide two numbers', function () {
74
+ forth.evaluate('12 3 /');
75
+ expect(forth.stack).toEqual([4]);
76
+ });
77
+ xit('performs integer division', function () {
78
+ forth.evaluate('8 3 /');
79
+ expect(forth.stack).toEqual([2]);
80
+ });
81
+ xit('errors if dividing by zero', function () {
82
+ expect(function () {
83
+ forth.evaluate('4 0 /');
84
+ }).toThrow(new Error('Division by zero'));
85
+ });
86
+ xit('errors if there is only one value on the stack', function () {
87
+ expect(function () {
88
+ forth.evaluate('1 /');
89
+ }).toThrow(new Error('Stack empty'));
90
+ });
91
+ xit('errors if there is nothing on the stack', function () {
92
+ expect(function () {
93
+ forth.evaluate('/');
94
+ }).toThrow(new Error('Stack empty'));
95
+ });
96
+ });
97
+
98
+ describe('combined arithmetic', function () {
99
+ xit('performs addition and subtraction', function () {
100
+ forth.evaluate('1 2 + 4 -');
101
+ expect(forth.stack).toEqual([-1]);
102
+ });
103
+ xit('performs multiplication and division', function () {
104
+ forth.evaluate('2 4 * 3 /');
105
+ expect(forth.stack).toEqual([2]);
106
+ });
107
+ });
108
+
109
+ describe('dup', function () {
110
+ xit('copies a value on the stack', function () {
111
+ forth.evaluate('1 dup');
112
+ expect(forth.stack).toEqual([1, 1]);
113
+ });
114
+ xit('copies the top value on the stack', function () {
115
+ forth.evaluate('1 2 dup');
116
+ expect(forth.stack).toEqual([1, 2, 2]);
117
+ });
118
+ xit('errors if there is nothing on the stack', function () {
119
+ expect(function () {
120
+ forth.evaluate('dup');
121
+ }).toThrow(new Error('Stack empty'));
122
+ });
123
+ });
124
+
125
+ describe('drop', function () {
126
+ xit('removes the top value on the stack if it is the only one', function () {
127
+ forth.evaluate('1 drop');
128
+ expect(forth.stack).toEqual([]);
129
+ });
130
+ xit('removes the top value on the stack if it is not the only one', function () {
131
+ forth.evaluate('1 2 drop');
132
+ expect(forth.stack).toEqual([1]);
133
+ });
134
+ xit('errors if there is nothing on the stack', function () {
135
+ expect(function () {
136
+ forth.evaluate('drop');
137
+ }).toThrow(new Error('Stack empty'));
138
+ });
139
+ });
140
+
141
+ describe('swap', function () {
142
+ xit('swaps the top two values on the stack if they are the only ones', function () {
143
+ forth.evaluate('1 2 swap');
144
+ expect(forth.stack).toEqual([2, 1]);
145
+ });
146
+ xit('swaps the top two values on the stack if they are not the only ones', function () {
147
+ forth.evaluate('1 2 3 swap');
148
+ expect(forth.stack).toEqual([1, 3, 2]);
149
+ });
150
+ xit('errors if there is only one value on the stack', function () {
151
+ expect(function () {
152
+ forth.evaluate('1 swap');
153
+ }).toThrow(new Error('Stack empty'));
154
+ });
155
+ xit('errors if there is nothing on the stack', function () {
156
+ expect(function () {
157
+ forth.evaluate('swap');
158
+ }).toThrow(new Error('Stack empty'));
159
+ });
160
+ });
161
+
162
+ describe('over', function () {
163
+ xit('copies the second element if there are only two', function () {
164
+ forth.evaluate('1 2 over');
165
+ expect(forth.stack).toEqual([1, 2, 1]);
166
+ });
167
+ xit('copies the second element if there are more than two', function () {
168
+ forth.evaluate('1 2 3 over');
169
+ expect(forth.stack).toEqual([1, 2, 3, 2]);
170
+ });
171
+ xit('errors if there is only one value on the stack', function () {
172
+ expect(function () {
173
+ forth.evaluate('1 over');
174
+ }).toThrow(new Error('Stack empty'));
175
+ });
176
+ xit('errors if there is nothing on the stack', function () {
177
+ expect(function () {
178
+ forth.evaluate('over');
179
+ }).toThrow(new Error('Stack empty'));
180
+ });
181
+ });
182
+
183
+ describe('user-defined words', function () {
184
+ xit('can consist of built-in words', function () {
185
+ forth.evaluate(': dup-twice dup dup ;');
186
+ forth.evaluate('1 dup-twice');
187
+ expect(forth.stack).toEqual([1, 1, 1]);
188
+ });
189
+ xit('execute in the right order', function () {
190
+ forth.evaluate(': countup 1 2 3 ;');
191
+ forth.evaluate('countup');
192
+ expect(forth.stack).toEqual([1, 2, 3]);
193
+ });
194
+ xit('can override other user-defined words', function () {
195
+ forth.evaluate(': foo dup ;');
196
+ forth.evaluate(': foo dup dup ;');
197
+ forth.evaluate( '1 foo');
198
+ expect(forth.stack).toEqual([1, 1, 1]);
199
+ });
200
+ xit('can override built-in words', function () {
201
+ forth.evaluate(': swap dup ;');
202
+ forth.evaluate('1 swap');
203
+ expect(forth.stack).toEqual([1, 1]);
204
+ });
205
+ xit('can override built-in operators', function () {
206
+ forth.evaluate(': + * ;');
207
+ forth.evaluate('3 4 +');
208
+ expect(forth.stack).toEqual([12]);
209
+ });
210
+ xit('cannot redefine numbers', function () {
211
+ expect(function () {
212
+ forth.evaluate(': 1 2 ;');
213
+ }).toThrow(new Error('Invalid definition'));
214
+ });
215
+ xit('errors if executing a non-existent word', function () {
216
+ expect(function () {
217
+ forth.evaluate('foo');
218
+ }).toThrow(new Error('Unknown command'));
219
+ });
220
+ xit('only defines words for current instance', function () {
221
+ var first = new Forth();
222
+ var second = new Forth();
223
+ first.evaluate(': + - ;');
224
+ first.evaluate('1 1 +');
225
+ second.evaluate('1 1 +');
226
+ expect(first.stack).toEqual([0]);
227
+ expect(second.stack).toEqual([2]);
228
+ });
229
+ });
230
+
231
+ describe('case-insensitivity', function () {
232
+ xit('DUP is case-insensitive', function () {
233
+ forth.evaluate('1 DUP Dup dup');
234
+ expect(forth.stack).toEqual([1, 1, 1, 1]);
235
+ });
236
+ xit('DROP is case-insensitive', function () {
237
+ forth.evaluate('1 2 3 4 DROP Drop drop');
238
+ expect(forth.stack).toEqual([1]);
239
+ });
240
+ xit('SWAP is case-insensitive', function () {
241
+ forth.evaluate('1 2 SWAP 3 Swap 4 swap');
242
+ expect(forth.stack).toEqual([2, 3, 4, 1]);
243
+ });
244
+ xit('OVER is case-insensitive', function () {
245
+ forth.evaluate('1 2 OVER Over over');
246
+ expect(forth.stack).toEqual([1, 2, 1, 2, 1]);
247
+ });
248
+ xit('user-defined words are case-insensitive', function () {
249
+ forth.evaluate(': foo dup ;');
250
+ forth.evaluate('1 FOO Foo foo');
251
+ expect(forth.stack).toEqual([1, 1, 1, 1]);
252
+ });
253
+ xit('definitions are case-insensitive', function () {
254
+ forth.evaluate(': SWAP DUP Dup dup ;');
255
+ forth.evaluate('1 swap');
256
+ expect(forth.stack).toEqual([1, 1, 1, 1]);
257
+ });
258
+ });
259
+ });
@@ -11,7 +11,7 @@
11
11
  "text_formatting"
12
12
  ],
13
13
  "unlocked_by": null,
14
- "uuid": "9099df24-f9fb-4bd0-8b7f-df52efed7840"
14
+ "uuid": "e2909553-add0-46d9-a95d-d687d12ccd32"
15
15
  },
16
16
  {
17
17
  "core": true,
@@ -22,7 +22,7 @@
22
22
  "strings"
23
23
  ],
24
24
  "unlocked_by": null,
25
- "uuid": "23fde0b3-c57b-439f-a9ad-3cd6ae286b62"
25
+ "uuid": "d5fcde07-bcef-4ee1-858b-fa4da55d7e0a"
26
26
  },
27
27
  {
28
28
  "core": true,
@@ -34,7 +34,7 @@
34
34
  "text_formatting"
35
35
  ],
36
36
  "unlocked_by": null,
37
- "uuid": "f38cd7b3-e1e6-4bcf-b1fe-c63ed94df636"
37
+ "uuid": "9c71aea2-ff12-44dc-8d54-c15aff6b4b35"
38
38
  },
39
39
  {
40
40
  "core": false,
@@ -45,7 +45,7 @@
45
45
  "strings"
46
46
  ],
47
47
  "unlocked_by": "leap",
48
- "uuid": "faaa79ba-ddfa-42dd-8668-4aa811757dee"
48
+ "uuid": "29338762-6ae0-4532-9465-bf67442b67d9"
49
49
  },
50
50
  {
51
51
  "core": false,
@@ -56,7 +56,7 @@
56
56
  "strings"
57
57
  ],
58
58
  "unlocked_by": "leap",
59
- "uuid": "9646d991-e3ad-475e-9231-c5723a73e57b"
59
+ "uuid": "3aa77e13-ebc8-41ef-9405-144ef3ae753a"
60
60
  },
61
61
  {
62
62
  "core": true,
@@ -66,7 +66,7 @@
66
66
  "mathematics"
67
67
  ],
68
68
  "unlocked_by": null,
69
- "uuid": "b985299f-c6eb-487e-9900-1b35a6e66dea"
69
+ "uuid": "251d7fd3-ed96-421c-af46-817ad40997e5"
70
70
  },
71
71
  {
72
72
  "core": false,
@@ -79,7 +79,7 @@
79
79
  "control_flow_loops"
80
80
  ],
81
81
  "unlocked_by": "run-length-encoding",
82
- "uuid": "312d3e2f-ac24-4e06-8e6c-f4651124c516"
82
+ "uuid": "baca9366-dee4-4759-98ac-2e76df5dfc49"
83
83
  },
84
84
  {
85
85
  "core": false,
@@ -92,7 +92,7 @@
92
92
  "strings"
93
93
  ],
94
94
  "unlocked_by": "isogram",
95
- "uuid": "c8ac2fca-fdec-4562-9c60-fdee5b541186"
95
+ "uuid": "49c8c8cc-f0e6-49dc-aac0-6c4acffff175"
96
96
  },
97
97
  {
98
98
  "core": false,
@@ -105,7 +105,7 @@
105
105
  "strings"
106
106
  ],
107
107
  "unlocked_by": "binary",
108
- "uuid": "b64e6544-4778-40e8-a216-86df5c366c9c"
108
+ "uuid": "f0ba9767-b0e5-4a80-9980-e135526b6f3f"
109
109
  },
110
110
  {
111
111
  "core": true,
@@ -119,7 +119,7 @@
119
119
  "searching"
120
120
  ],
121
121
  "unlocked_by": null,
122
- "uuid": "2c50d23c-c15c-42d5-bc48-48afd21cdcf9"
122
+ "uuid": "ca4f3b4c-ab14-4a51-9bda-0391ea36e721"
123
123
  },
124
124
  {
125
125
  "core": false,
@@ -133,7 +133,7 @@
133
133
  "strings"
134
134
  ],
135
135
  "unlocked_by": "binary-search",
136
- "uuid": "25f501e6-40e8-4fd0-9dc3-ce5504d7a7a7"
136
+ "uuid": "b9e455a0-688b-4502-aed7-a45536dde5ef"
137
137
  },
138
138
  {
139
139
  "core": false,
@@ -147,7 +147,7 @@
147
147
  "recursion"
148
148
  ],
149
149
  "unlocked_by": "binary-search",
150
- "uuid": "c976a2aa-aaa8-42b5-9666-8f9d8b16b27c"
150
+ "uuid": "9d19c9ca-7e82-40b5-8951-75354eb7991f"
151
151
  },
152
152
  {
153
153
  "core": false,
@@ -158,7 +158,7 @@
158
158
  "strings"
159
159
  ],
160
160
  "unlocked_by": "isogram",
161
- "uuid": "a15f48db-7f35-4a20-8830-e3eb91db164f"
161
+ "uuid": "06613caf-8f73-43e6-9fad-3d6df4c7c344"
162
162
  },
163
163
  {
164
164
  "core": false,
@@ -170,7 +170,7 @@
170
170
  "strings"
171
171
  ],
172
172
  "unlocked_by": "isogram",
173
- "uuid": "32724558-411b-4945-95fe-aaf3eae6daf2"
173
+ "uuid": "e5a5d3ca-af5c-43c9-8f99-f5eb522169af"
174
174
  },
175
175
  {
176
176
  "core": true,
@@ -182,7 +182,7 @@
182
182
  "matrices"
183
183
  ],
184
184
  "unlocked_by": null,
185
- "uuid": "cfcefc94-cc73-4438-a62f-15c63a70bf5e"
185
+ "uuid": "d4de8f02-ba5b-4357-8285-9cb41dc3b72e"
186
186
  },
187
187
  {
188
188
  "core": false,
@@ -195,7 +195,7 @@
195
195
  "text_formatting"
196
196
  ],
197
197
  "unlocked_by": "house",
198
- "uuid": "38b18de8-d0d9-4a4d-934f-2893b1f1ce45"
198
+ "uuid": "242da1b4-c8ad-48c8-bc0f-e43fd654f8ae"
199
199
  },
200
200
  {
201
201
  "core": true,
@@ -207,7 +207,7 @@
207
207
  "strings"
208
208
  ],
209
209
  "unlocked_by": null,
210
- "uuid": "3e70727a-1839-4ccf-8205-f2c8455cfdd1"
210
+ "uuid": "3ae90024-cd9a-4884-836f-3a7ea94cce01"
211
211
  },
212
212
  {
213
213
  "core": false,
@@ -219,7 +219,7 @@
219
219
  "mathematics"
220
220
  ],
221
221
  "unlocked_by": "difference-of-squares",
222
- "uuid": "d781a53f-8eb8-44d0-8ded-57d943225604"
222
+ "uuid": "8b7ce997-ce5f-4968-b661-d3cd9fed0fc9"
223
223
  },
224
224
  {
225
225
  "core": false,
@@ -230,7 +230,7 @@
230
230
  "transforming"
231
231
  ],
232
232
  "unlocked_by": "list-ops",
233
- "uuid": "c4846231-c68b-46cf-abe0-9e0b9f7c2825"
233
+ "uuid": "df4cec80-6850-4197-a65f-2159fbedcbe9"
234
234
  },
235
235
  {
236
236
  "core": false,
@@ -242,7 +242,7 @@
242
242
  "strings"
243
243
  ],
244
244
  "unlocked_by": "hamming",
245
- "uuid": "903e3be6-cefd-4db5-b3dc-a325c4bcae7a"
245
+ "uuid": "a5fb57d1-1a31-43a0-adc4-7f4b8046c9eb"
246
246
  },
247
247
  {
248
248
  "core": false,
@@ -254,7 +254,7 @@
254
254
  "strings"
255
255
  ],
256
256
  "unlocked_by": "house",
257
- "uuid": "50425ddf-fbec-4740-99eb-14cb7cc8a78a"
257
+ "uuid": "68650122-5452-4674-8676-5387cc24fd14"
258
258
  },
259
259
  {
260
260
  "core": false,
@@ -266,7 +266,7 @@
266
266
  "mathematics"
267
267
  ],
268
268
  "unlocked_by": "difference-of-squares",
269
- "uuid": "39bb7747-23e3-4d96-880d-2af302b0c328"
269
+ "uuid": "da6a0c52-5943-412e-8649-8965ae9da5cf"
270
270
  },
271
271
  {
272
272
  "core": false,
@@ -278,7 +278,7 @@
278
278
  "transforming"
279
279
  ],
280
280
  "unlocked_by": "hamming",
281
- "uuid": "a42ea84d-030a-446b-8537-0bef558320df"
281
+ "uuid": "5029a8ed-3766-4632-bdab-964ca4a06e34"
282
282
  },
283
283
  {
284
284
  "core": false,
@@ -290,7 +290,7 @@
290
290
  "text_formatting"
291
291
  ],
292
292
  "unlocked_by": "allergies",
293
- "uuid": "c2130674-fe39-4e40-a1b5-b6b6ea24e255"
293
+ "uuid": "23cfe01b-41ea-4a18-beca-ca1d3c38fb69"
294
294
  },
295
295
  {
296
296
  "core": true,
@@ -301,7 +301,7 @@
301
301
  "control_flow_if_else_statements"
302
302
  ],
303
303
  "unlocked_by": null,
304
- "uuid": "ffde0b07-d6b1-4b55-94d9-ec564817cbb8"
304
+ "uuid": "02407c99-08bf-4ea4-b9df-fdef0ad18fa4"
305
305
  },
306
306
  {
307
307
  "core": false,
@@ -314,7 +314,7 @@
314
314
  "strings"
315
315
  ],
316
316
  "unlocked_by": "hamming",
317
- "uuid": "7ffbdb77-a0a3-4bcf-8fb7-d3c34bdfcaf5"
317
+ "uuid": "8fa0c325-56ca-481f-a2cf-4c3fcffb088f"
318
318
  },
319
319
  {
320
320
  "core": false,
@@ -325,7 +325,7 @@
325
325
  "control_flow_if_else_statements"
326
326
  ],
327
327
  "unlocked_by": "bank-account",
328
- "uuid": "84f1b842-3c9b-4d96-93f1-e26577dc493f"
328
+ "uuid": "d531b625-ac92-4042-9cda-169398b0b296"
329
329
  },
330
330
  {
331
331
  "core": true,
@@ -338,7 +338,7 @@
338
338
  "mathematics"
339
339
  ],
340
340
  "unlocked_by": null,
341
- "uuid": "f141a9a3-af4b-4257-92b8-f850a987cf49"
341
+ "uuid": "b8880be4-02e7-4911-b049-927c028ed8e0"
342
342
  },
343
343
  {
344
344
  "core": true,
@@ -351,7 +351,7 @@
351
351
  "text_formatting"
352
352
  ],
353
353
  "unlocked_by": null,
354
- "uuid": "1c624b3f-7cf6-4896-90ff-11aec0d37059"
354
+ "uuid": "b236519f-987b-4832-a698-b9eeebf29efb"
355
355
  },
356
356
  {
357
357
  "core": true,
@@ -365,7 +365,7 @@
365
365
  "text_formatting"
366
366
  ],
367
367
  "unlocked_by": null,
368
- "uuid": "d70fae4a-b8a0-41ab-856f-e078fcb2f85c"
368
+ "uuid": "f9a5560e-5f84-451a-a8f8-632ea8525e08"
369
369
  },
370
370
  {
371
371
  "core": false,
@@ -377,7 +377,7 @@
377
377
  "control_flow_loops"
378
378
  ],
379
379
  "unlocked_by": "list-ops",
380
- "uuid": "23120234-680d-4505-96e8-e87d669f0234"
380
+ "uuid": "3e2510c0-76ea-40cf-a56c-5f6d2c4a33c2"
381
381
  },
382
382
  {
383
383
  "core": true,
@@ -389,7 +389,7 @@
389
389
  "text_formatting"
390
390
  ],
391
391
  "unlocked_by": null,
392
- "uuid": "4db71417-612a-41d2-9db4-d53fdc7d530c"
392
+ "uuid": "f4369803-07c4-4bbe-9bdc-3f4eea510802"
393
393
  },
394
394
  {
395
395
  "core": false,
@@ -401,7 +401,7 @@
401
401
  "strings"
402
402
  ],
403
403
  "unlocked_by": "robot-name",
404
- "uuid": "c603a44b-c027-4906-aaa9-11522a92e3cb"
404
+ "uuid": "742a010e-85f2-4259-a444-86a7fb73b9bb"
405
405
  },
406
406
  {
407
407
  "core": false,
@@ -413,7 +413,7 @@
413
413
  "mathematics"
414
414
  ],
415
415
  "unlocked_by": "difference-of-squares",
416
- "uuid": "d9fbf011-73ea-4e00-b6e9-85d2418b8565"
416
+ "uuid": "2bee6ff9-3826-4cf8-adc4-c00d4b87bbd7"
417
417
  },
418
418
  {
419
419
  "core": true,
@@ -424,7 +424,7 @@
424
424
  "logic"
425
425
  ],
426
426
  "unlocked_by": null,
427
- "uuid": "79c25dc6-d2d5-4089-8016-9c01fc2e53f8"
427
+ "uuid": "1e9b4ae0-0c07-4ed6-8e31-14682fda1f8a"
428
428
  },
429
429
  {
430
430
  "core": false,
@@ -434,7 +434,7 @@
434
434
  "classes"
435
435
  ],
436
436
  "unlocked_by": "leap",
437
- "uuid": "b10fd75b-53dd-4220-b76b-a2f1ed2d2ea2"
437
+ "uuid": "e41af697-bb33-46f4-a2d0-14c5440ca209"
438
438
  },
439
439
  {
440
440
  "core": false,
@@ -445,7 +445,7 @@
445
445
  "mathematics"
446
446
  ],
447
447
  "unlocked_by": "diamond",
448
- "uuid": "2a38e35d-04ab-45b1-aaff-dab7c9b60306"
448
+ "uuid": "b7a4bd55-7e51-46f1-9bd9-90185b99e238"
449
449
  },
450
450
  {
451
451
  "core": false,
@@ -457,7 +457,7 @@
457
457
  "mathematics"
458
458
  ],
459
459
  "unlocked_by": "nth-prime",
460
- "uuid": "4b5615e0-5c82-472e-84ed-f91b58ffc5c9"
460
+ "uuid": "69cdb196-ac32-4733-b978-a29c43717936"
461
461
  },
462
462
  {
463
463
  "core": false,
@@ -467,7 +467,7 @@
467
467
  "control_flow_loops"
468
468
  ],
469
469
  "unlocked_by": "leap",
470
- "uuid": "1430571b-001a-4298-b834-1b6342d1c89a"
470
+ "uuid": "03e986ce-396f-4243-9df5-edf10d4e7bd8"
471
471
  },
472
472
  {
473
473
  "core": false,
@@ -479,7 +479,7 @@
479
479
  "strings"
480
480
  ],
481
481
  "unlocked_by": "allergies",
482
- "uuid": "40e73366-3ee5-4190-99bc-fad839c59a40"
482
+ "uuid": "d669d338-c3f1-40ea-ae12-c77127c6fcdc"
483
483
  },
484
484
  {
485
485
  "core": true,
@@ -492,7 +492,7 @@
492
492
  "sets"
493
493
  ],
494
494
  "unlocked_by": null,
495
- "uuid": "2530da0a-050c-472d-9f0c-cfe9045fb09f"
495
+ "uuid": "ed37d6db-7cbe-4219-bdb0-f15f28f60f1e"
496
496
  },
497
497
  {
498
498
  "core": false,
@@ -502,7 +502,7 @@
502
502
  "time"
503
503
  ],
504
504
  "unlocked_by": "leap",
505
- "uuid": "abe93c0d-a99c-4b58-a86a-3f96df09a186"
505
+ "uuid": "8276c090-4923-4bce-a42e-94be3a61101a"
506
506
  },
507
507
  {
508
508
  "core": false,
@@ -514,7 +514,7 @@
514
514
  "strings"
515
515
  ],
516
516
  "unlocked_by": "matrix",
517
- "uuid": "d7f4c19a-ac4c-4622-a5dd-e43b883365b8"
517
+ "uuid": "52cd8150-1d95-4f1e-b964-7ec40d64acef"
518
518
  },
519
519
  {
520
520
  "core": false,
@@ -526,7 +526,7 @@
526
526
  "strings"
527
527
  ],
528
528
  "unlocked_by": "run-length-encoding",
529
- "uuid": "3f8cc956-0f54-441f-b25a-c97390750bb6"
529
+ "uuid": "68232a5f-bac4-4390-b13a-aad42aa41e60"
530
530
  },
531
531
  {
532
532
  "core": false,
@@ -537,7 +537,7 @@
537
537
  "exception_handling"
538
538
  ],
539
539
  "unlocked_by": "difference-of-squares",
540
- "uuid": "f3963d89-aacd-4502-ab60-b2fb127b30a5"
540
+ "uuid": "206802f9-7c6c-48d6-985e-73f2ec0290d0"
541
541
  },
542
542
  {
543
543
  "core": false,
@@ -547,7 +547,7 @@
547
547
  "classes"
548
548
  ],
549
549
  "unlocked_by": "bank-account",
550
- "uuid": "a9e467c9-e820-49d8-aa45-542fcee4f112"
550
+ "uuid": "8e2dc8f7-af6d-4c9d-98cb-5560eeb299ca"
551
551
  },
552
552
  {
553
553
  "core": false,
@@ -559,7 +559,7 @@
559
559
  "coroutines"
560
560
  ],
561
561
  "unlocked_by": "list-ops",
562
- "uuid": "e96a4a0a-ac81-4969-ac50-93713958f06a"
562
+ "uuid": "4527f869-1901-4301-88bf-1c6fbb4d5898"
563
563
  },
564
564
  {
565
565
  "core": false,
@@ -571,7 +571,7 @@
571
571
  "control_flow_loops"
572
572
  ],
573
573
  "unlocked_by": "custom-set",
574
- "uuid": "530c358d-44e9-4b36-9ced-a1b633591a3d"
574
+ "uuid": "d5dae487-8d85-4b9c-a218-f6fb8262f81b"
575
575
  },
576
576
  {
577
577
  "core": false,
@@ -582,7 +582,7 @@
582
582
  "strings"
583
583
  ],
584
584
  "unlocked_by": "matrix",
585
- "uuid": "91cff99a-b182-4a6d-befb-ce716d290996"
585
+ "uuid": "f4008921-35cf-4c61-bc3b-aecd20b2f36f"
586
586
  },
587
587
  {
588
588
  "core": true,
@@ -595,7 +595,7 @@
595
595
  "text_formatting"
596
596
  ],
597
597
  "unlocked_by": null,
598
- "uuid": "464ef39f-8991-49f6-b6eb-5d811a262363"
598
+ "uuid": "6d43c48f-47d0-443f-87e0-eeb6e535407f"
599
599
  },
600
600
  {
601
601
  "core": false,
@@ -609,7 +609,7 @@
609
609
  "strings"
610
610
  ],
611
611
  "unlocked_by": "matrix",
612
- "uuid": "f41c1b0e-26e7-43d5-b1d2-106c08d6fa4a"
612
+ "uuid": "fcb9cc16-7690-4ee6-a373-c8476063ec57"
613
613
  },
614
614
  {
615
615
  "core": false,
@@ -621,7 +621,7 @@
621
621
  "text_formatting"
622
622
  ],
623
623
  "unlocked_by": "run-length-encoding",
624
- "uuid": "058b40fe-9ca7-4082-a525-8b01b5d3a632"
624
+ "uuid": "07f03e4f-be9a-411f-9501-efa610b16f7b"
625
625
  },
626
626
  {
627
627
  "core": true,
@@ -633,7 +633,7 @@
633
633
  "filtering"
634
634
  ],
635
635
  "unlocked_by": null,
636
- "uuid": "71a6d7d8-938b-4a8f-a216-ec0e8326ea52"
636
+ "uuid": "309e88ac-2d18-419f-aee6-76d9d3230209"
637
637
  },
638
638
  {
639
639
  "core": false,
@@ -645,7 +645,7 @@
645
645
  "time"
646
646
  ],
647
647
  "unlocked_by": "pig-latin",
648
- "uuid": "bf78cd80-3f8d-4075-b893-ba4ded5bf179"
648
+ "uuid": "528a5545-c0a1-44dc-89dd-efaa39f44a14"
649
649
  },
650
650
  {
651
651
  "core": false,
@@ -657,7 +657,7 @@
657
657
  "text_formatting"
658
658
  ],
659
659
  "unlocked_by": "run-length-encoding",
660
- "uuid": "49d08ed0-3a4a-44f6-beb3-ae086255e59f"
660
+ "uuid": "66aa24ed-373f-46d4-9cfa-a86cad86777a"
661
661
  },
662
662
  {
663
663
  "core": false,
@@ -668,7 +668,7 @@
668
668
  "strings"
669
669
  ],
670
670
  "unlocked_by": "hamming",
671
- "uuid": "4ec23243-6401-4be7-9770-1cd235da0557"
671
+ "uuid": "92b5536c-1129-4c93-875d-df2b4178af70"
672
672
  },
673
673
  {
674
674
  "core": false,
@@ -679,7 +679,7 @@
679
679
  "exception_handling"
680
680
  ],
681
681
  "unlocked_by": "difference-of-squares",
682
- "uuid": "d2004df3-1cc5-4f78-a564-f66771425fd3"
682
+ "uuid": "f4bb526f-8cd6-4435-8fcc-32099553a989"
683
683
  },
684
684
  {
685
685
  "core": false,
@@ -692,7 +692,7 @@
692
692
  "text_formatting"
693
693
  ],
694
694
  "unlocked_by": "run-length-encoding",
695
- "uuid": "d1fedc2b-9771-49b5-b253-05e1337448c6"
695
+ "uuid": "ead29411-43a4-4be0-8e3e-d93d8c6fd411"
696
696
  },
697
697
  {
698
698
  "core": false,
@@ -704,7 +704,7 @@
704
704
  "text_formatting"
705
705
  ],
706
706
  "unlocked_by": "leap",
707
- "uuid": "5e38f418-d279-4d2f-a035-f440e59c4635"
707
+ "uuid": "baa2c87a-aec5-47ef-b92d-d2ca39ce4bf2"
708
708
  },
709
709
  {
710
710
  "core": false,
@@ -716,7 +716,7 @@
716
716
  "strings"
717
717
  ],
718
718
  "unlocked_by": "matrix",
719
- "uuid": "a54806a0-d17c-4ae9-a48e-bc587eab93ea"
719
+ "uuid": "d677e28f-a162-4edf-9e22-b57589540087"
720
720
  },
721
721
  {
722
722
  "core": false,
@@ -730,7 +730,7 @@
730
730
  "text_parsing"
731
731
  ],
732
732
  "unlocked_by": "allergies",
733
- "uuid": "d4a793a8-bd4a-478d-a4e2-ee20dd4b6085"
733
+ "uuid": "6d1ff01a-aee3-4da0-8952-617e7aae86f4"
734
734
  },
735
735
  {
736
736
  "core": false,
@@ -742,7 +742,7 @@
742
742
  "exception_handling"
743
743
  ],
744
744
  "unlocked_by": "custom-set",
745
- "uuid": "5b636f8a-37ba-412d-b957-633caac86369"
745
+ "uuid": "ad81b98a-b9b4-4894-a05b-e7b052de122a"
746
746
  },
747
747
  {
748
748
  "core": false,
@@ -757,7 +757,7 @@
757
757
  "trees"
758
758
  ],
759
759
  "unlocked_by": "binary-search",
760
- "uuid": "84715ca7-b4cb-41bd-a5f0-1c45e372d834"
760
+ "uuid": "83773c82-0df3-4957-9111-68b1143ae7fb"
761
761
  },
762
762
  {
763
763
  "core": false,
@@ -769,7 +769,7 @@
769
769
  "exception_handling"
770
770
  ],
771
771
  "unlocked_by": "allergies",
772
- "uuid": "6132095c-964f-4d58-9555-b4c77818e6d2"
772
+ "uuid": "7ee42679-3ed9-413c-a43b-5e21813e8f62"
773
773
  },
774
774
  {
775
775
  "core": true,
@@ -782,7 +782,7 @@
782
782
  "strings"
783
783
  ],
784
784
  "unlocked_by": null,
785
- "uuid": "90fe2b43-5f4e-42fe-89ad-4fff49ccbb53"
785
+ "uuid": "5d24d945-9f15-450a-bb47-0b9c6a9e8c47"
786
786
  },
787
787
  {
788
788
  "core": false,
@@ -796,7 +796,7 @@
796
796
  "strings"
797
797
  ],
798
798
  "unlocked_by": "matrix",
799
- "uuid": "26ea07b8-2658-47c2-9218-059c168ba1ea"
799
+ "uuid": "4b1c805c-e833-4f84-bf1f-931c640ade6d"
800
800
  },
801
801
  {
802
802
  "core": false,
@@ -808,7 +808,7 @@
808
808
  "mathematics"
809
809
  ],
810
810
  "unlocked_by": "nth-prime",
811
- "uuid": "0f85f581-0077-447e-a5f4-7b58c1b4b7a8"
811
+ "uuid": "b6050415-b980-4d01-8520-ecdf24f40e37"
812
812
  },
813
813
  {
814
814
  "core": false,
@@ -819,7 +819,7 @@
819
819
  "strings"
820
820
  ],
821
821
  "unlocked_by": "isogram",
822
- "uuid": "3f8c4f1b-b0b7-4f6e-8cd9-d5e252737ebb"
822
+ "uuid": "422b08d7-7aa9-4f54-9a1a-ad2a0d90fc6d"
823
823
  },
824
824
  {
825
825
  "core": false,
@@ -831,7 +831,7 @@
831
831
  "mathematics"
832
832
  ],
833
833
  "unlocked_by": "binary",
834
- "uuid": "1ee89535-3e91-4404-9116-adcbf87f2390"
834
+ "uuid": "4fc33e06-6ac0-432c-8bbe-d598c193443e"
835
835
  },
836
836
  {
837
837
  "core": false,
@@ -845,7 +845,7 @@
845
845
  "strings"
846
846
  ],
847
847
  "unlocked_by": "matrix",
848
- "uuid": "6f2e38ae-57d8-4b4e-b1db-ae35c066ece4"
848
+ "uuid": "53cd372b-8e8c-4f95-92fa-588b9ad3140f"
849
849
  },
850
850
  {
851
851
  "core": true,
@@ -857,7 +857,7 @@
857
857
  "control_flow_loops"
858
858
  ],
859
859
  "unlocked_by": null,
860
- "uuid": "6e7a0d97-580b-4b21-bcad-e89e0473d507"
860
+ "uuid": "e3d0e005-6397-4006-92ec-78f86178c684"
861
861
  },
862
862
  {
863
863
  "core": false,
@@ -869,7 +869,7 @@
869
869
  "text_formatting"
870
870
  ],
871
871
  "unlocked_by": "pig-latin",
872
- "uuid": "7159ffe2-3f5f-4d12-8a38-843452ef5d7e"
872
+ "uuid": "8901be3e-f10b-4ab5-a81e-3916cac7138c"
873
873
  },
874
874
  {
875
875
  "core": false,
@@ -883,7 +883,7 @@
883
883
  "graphs"
884
884
  ],
885
885
  "unlocked_by": "binary-search",
886
- "uuid": "ba763756-e934-473f-a01c-a7c9ea0a971d"
886
+ "uuid": "57444e1f-d558-4684-a84e-6622e18771b6"
887
887
  },
888
888
  {
889
889
  "core": false,
@@ -894,7 +894,7 @@
894
894
  "control_flow_loops"
895
895
  ],
896
896
  "unlocked_by": "binary-search",
897
- "uuid": "790d60b6-a64e-482f-8c2b-3e2442ac0b4e"
897
+ "uuid": "6de1c104-16d0-41a3-8bed-a6994b7b2748"
898
898
  },
899
899
  {
900
900
  "core": false,
@@ -906,7 +906,7 @@
906
906
  "control_flow_if_else_statements"
907
907
  ],
908
908
  "unlocked_by": "leap",
909
- "uuid": "a608af44-59df-425d-a652-163635bf740e"
909
+ "uuid": "c0aacfca-82d3-4494-bc38-821dd0613c38"
910
910
  },
911
911
  {
912
912
  "core": false,
@@ -919,7 +919,7 @@
919
919
  "graphs"
920
920
  ],
921
921
  "unlocked_by": "matrix",
922
- "uuid": "beca7d79-9237-4344-b058-66e0fa840691"
922
+ "uuid": "0c6b0312-5415-4c7a-9913-b594542df491"
923
923
  },
924
924
  {
925
925
  "core": false,
@@ -931,7 +931,7 @@
931
931
  "mathematics"
932
932
  ],
933
933
  "unlocked_by": "difference-of-squares",
934
- "uuid": "bd4cd740-b78d-11e7-abc4-cec278b6b50a"
934
+ "uuid": "f01e08a7-c14a-4fc5-9713-8c59f92c9b6c"
935
935
  },
936
936
  {
937
937
  "core": false,
@@ -941,24 +941,35 @@
941
941
  "mathematics"
942
942
  ],
943
943
  "unlocked_by": "list-ops",
944
- "uuid": "09df8b87-c2cf-44a7-879c-96c9030cf27b"
944
+ "uuid": "8e36e8ae-f2c5-4fea-a807-8713b2b23ee4"
945
945
  },
946
946
  {
947
947
  "core": false,
948
948
  "difficulty": 3,
949
949
  "slug": "isbn-verifier",
950
950
  "topics": [
951
- "mathematics",
952
951
  "control_flow_loops",
952
+ "mathematics",
953
953
  "strings"
954
954
  ],
955
955
  "unlocked_by": "run-length-encoding",
956
- "uuid": "a9a6a2c7-2a58-4090-b538-5a275c521fe0"
956
+ "uuid": "673d0132-6273-45ae-af27-8beb203bba81"
957
+ },
958
+ {
959
+ "core": false,
960
+ "difficulty": 3,
961
+ "slug": "reverse-string",
962
+ "topics": [
963
+ "arrays",
964
+ "strings"
965
+ ],
966
+ "unlocked_by": "list-ops",
967
+ "uuid": "2d443a8f-65de-496e-9527-8a54a840ba69"
957
968
  },
958
969
  {
959
970
  "deprecated": true,
960
971
  "slug": "accumulate",
961
- "uuid": "70bc1661-9132-43af-bb44-b51e7d81676b"
972
+ "uuid": "cf3386ef-177c-41f6-8569-040d3a9c9175"
962
973
  }
963
974
  ],
964
975
  "foregone": [],