trackler 2.2.0.2 → 2.2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fixtures/deprecation-fixtures/tracks/repo-nope/config.json +2 -0
- data/fixtures/deprecation-fixtures/tracks/repo-yepp/config.json +3 -0
- data/lib/trackler/track.rb +1 -1
- data/lib/trackler/version.rb +1 -1
- data/tracks/csharp/config/exercise_readme.go.tmpl +16 -0
- data/tracks/csharp/exercises/accumulate/README.md +44 -0
- data/tracks/csharp/exercises/acronym/README.md +21 -0
- data/tracks/csharp/exercises/all-your-base/README.md +41 -0
- data/tracks/csharp/exercises/allergies/README.md +46 -0
- data/tracks/csharp/exercises/alphametics/README.md +48 -0
- data/tracks/csharp/exercises/anagram/README.md +19 -0
- data/tracks/csharp/exercises/atbash-cipher/README.md +40 -0
- data/tracks/csharp/exercises/bank-account/README.md +41 -0
- data/tracks/csharp/exercises/beer-song/README.md +336 -0
- data/tracks/csharp/exercises/binary-search-tree/README.md +66 -0
- data/tracks/csharp/exercises/binary-search/README.md +47 -0
- data/tracks/csharp/exercises/bob/README.md +24 -0
- data/tracks/csharp/exercises/book-store/README.md +80 -0
- data/tracks/csharp/exercises/bowling/README.md +59 -0
- data/tracks/csharp/exercises/bracket-push/README.md +16 -0
- data/tracks/csharp/exercises/change/README.md +29 -0
- data/tracks/csharp/exercises/circular-buffer/README.md +56 -0
- data/tracks/csharp/exercises/clock/README.md +25 -0
- data/tracks/csharp/exercises/connect/README.md +40 -0
- data/tracks/csharp/exercises/crypto-square/README.md +80 -0
- data/tracks/csharp/exercises/custom-set/README.md +23 -0
- data/tracks/csharp/exercises/diamond/README.md +75 -0
- data/tracks/csharp/exercises/difference-of-squares/README.md +30 -0
- data/tracks/csharp/exercises/diffie-hellman/README.md +55 -0
- data/tracks/csharp/exercises/dominoes/README.md +24 -0
- data/tracks/csharp/exercises/dot-dsl/README.md +37 -0
- data/tracks/csharp/exercises/error-handling/README.md +19 -0
- data/tracks/csharp/exercises/etl/README.md +57 -0
- data/tracks/csharp/exercises/flatten-array/README.md +24 -0
- data/tracks/csharp/exercises/food-chain/README.md +80 -0
- data/tracks/csharp/exercises/forth/README.md +39 -0
- data/tracks/csharp/exercises/gigasecond/README.md +17 -0
- data/tracks/csharp/exercises/go-counting/README.md +43 -0
- data/tracks/csharp/exercises/grade-school/README.md +48 -0
- data/tracks/csharp/exercises/grains/README.md +40 -0
- data/tracks/csharp/exercises/grep/README.md +77 -0
- data/tracks/csharp/exercises/hamming/README.md +48 -0
- data/tracks/csharp/exercises/hangman/README.md +32 -0
- data/tracks/csharp/exercises/hello-world/README.md +27 -0
- data/tracks/csharp/exercises/house/README.md +123 -0
- data/tracks/csharp/exercises/isogram/README.md +25 -0
- data/tracks/csharp/exercises/kindergarten-garden/README.md +72 -0
- data/tracks/csharp/exercises/largest-series-product/README.md +26 -0
- data/tracks/csharp/exercises/leap/README.md +39 -0
- data/tracks/csharp/exercises/ledger/README.md +24 -0
- data/tracks/csharp/exercises/linked-list/README.md +40 -0
- data/tracks/csharp/exercises/list-ops/README.md +19 -0
- data/tracks/csharp/exercises/luhn/README.md +77 -0
- data/tracks/csharp/exercises/markdown/README.md +28 -0
- data/tracks/csharp/exercises/matrix/README.md +51 -0
- data/tracks/csharp/exercises/meetup/README.md +36 -0
- data/tracks/csharp/exercises/minesweeper/README.md +36 -0
- data/tracks/csharp/exercises/nth-prime/README.md +29 -0
- data/tracks/csharp/exercises/nucleotide-count/README.md +43 -0
- data/tracks/csharp/exercises/ocr-numbers/README.md +91 -0
- data/tracks/csharp/exercises/palindrome-products/README.md +51 -0
- data/tracks/csharp/exercises/pangram/README.md +21 -0
- data/tracks/csharp/exercises/parallel-letter-frequency/README.md +17 -0
- data/tracks/csharp/exercises/pascals-triangle/README.md +27 -0
- data/tracks/csharp/exercises/perfect-numbers/README.md +30 -0
- data/tracks/csharp/exercises/phone-number/README.md +40 -0
- data/tracks/csharp/exercises/pig-latin/README.md +30 -0
- data/tracks/csharp/exercises/poker/README.md +18 -0
- data/tracks/csharp/exercises/pov/README.md +52 -0
- data/tracks/csharp/exercises/prime-factors/README.md +42 -0
- data/tracks/csharp/exercises/protein-translation/README.md +55 -0
- data/tracks/csharp/exercises/proverb/README.md +28 -0
- data/tracks/csharp/exercises/pythagorean-triplet/README.md +30 -0
- data/tracks/csharp/exercises/queen-attack/README.md +39 -0
- data/tracks/csharp/exercises/rail-fence-cipher/README.md +66 -0
- data/tracks/csharp/exercises/raindrops/README.md +30 -0
- data/tracks/csharp/exercises/react/README.md +29 -0
- data/tracks/csharp/exercises/rectangles/README.md +73 -0
- data/tracks/csharp/exercises/rna-transcription/README.md +31 -0
- data/tracks/csharp/exercises/robot-name/README.md +28 -0
- data/tracks/csharp/exercises/robot-simulator/README.md +40 -0
- data/tracks/csharp/exercises/roman-numerals/README.md +59 -0
- data/tracks/csharp/exercises/rotational-cipher/README.md +42 -0
- data/tracks/csharp/exercises/run-length-encoding/README.md +36 -0
- data/tracks/csharp/exercises/saddle-points/README.md +44 -0
- data/tracks/csharp/exercises/say/README.md +75 -0
- data/tracks/csharp/exercises/scale-generator/README.md +66 -0
- data/tracks/csharp/exercises/scrabble-score/README.md +50 -0
- data/tracks/csharp/exercises/secret-handshake/README.md +41 -0
- data/tracks/csharp/exercises/series/README.md +33 -0
- data/tracks/csharp/exercises/sgf-parsing/README.md +78 -0
- data/tracks/csharp/exercises/sieve/README.md +40 -0
- data/tracks/csharp/exercises/simple-cipher/README.md +96 -0
- data/tracks/csharp/exercises/simple-linked-list/README.md +38 -0
- data/tracks/csharp/exercises/space-age/README.md +30 -0
- data/tracks/csharp/exercises/strain/README.md +46 -0
- data/tracks/csharp/exercises/sublist/README.md +32 -0
- data/tracks/csharp/exercises/sum-of-multiples/README.md +28 -0
- data/tracks/csharp/exercises/tournament/README.md +74 -0
- data/tracks/csharp/exercises/transpose/README.md +71 -0
- data/tracks/csharp/exercises/tree-building/README.md +36 -0
- data/tracks/csharp/exercises/triangle/README.md +32 -0
- data/tracks/csharp/exercises/twelve-days/README.md +45 -0
- data/tracks/csharp/exercises/two-bucket/README.md +42 -0
- data/tracks/csharp/exercises/variable-length-quantity/README.md +50 -0
- data/tracks/csharp/exercises/word-count/README.md +25 -0
- data/tracks/csharp/exercises/word-search/README.md +43 -0
- data/tracks/csharp/exercises/wordy/README.md +73 -0
- data/tracks/csharp/exercises/zebra-puzzle/README.md +43 -0
- data/tracks/csharp/exercises/zipper/README.md +41 -0
- data/tracks/dart/config/exercise_readme.go.tmpl +16 -0
- data/tracks/dart/exercises/bob/README.md +18 -0
- data/tracks/dart/exercises/difference-of-squares/README.md +19 -0
- data/tracks/dart/exercises/gigasecond/README.md +11 -0
- data/tracks/dart/exercises/hamming/README.md +42 -0
- data/tracks/dart/exercises/hello-world/README.md +21 -0
- data/tracks/dart/exercises/leap/README.md +33 -0
- data/tracks/dart/exercises/rna-transcription/README.md +25 -0
- data/tracks/delphi/config.json +25 -32
- data/tracks/elixir/config.json +255 -3
- data/tracks/elixir/config/exercise_readme.go.tmpl +16 -0
- data/tracks/elixir/exercises/accumulate/README.md +72 -0
- data/tracks/elixir/exercises/acronym/README.md +52 -0
- data/tracks/elixir/exercises/all-your-base/README.md +72 -0
- data/tracks/elixir/exercises/allergies/README.md +74 -0
- data/tracks/elixir/exercises/anagram/README.md +50 -0
- data/tracks/elixir/exercises/atbash-cipher/README.md +71 -0
- data/tracks/elixir/exercises/bank-account/README.md +67 -0
- data/tracks/elixir/exercises/beer-song/README.md +364 -0
- data/tracks/elixir/exercises/binary-search/README.md +78 -0
- data/tracks/elixir/exercises/binary/README.md +72 -0
- data/tracks/elixir/exercises/bob/README.md +55 -0
- data/tracks/elixir/exercises/bowling/README.md +90 -0
- data/tracks/elixir/exercises/bowling/bowling_test.exs +91 -18
- data/tracks/elixir/exercises/bowling/example.exs +4 -4
- data/tracks/elixir/exercises/bracket-push/README.md +47 -0
- data/tracks/elixir/exercises/change/README.md +60 -0
- data/tracks/elixir/exercises/clock/README.md +50 -0
- data/tracks/elixir/exercises/collatz-conjecture/README.md +70 -0
- data/tracks/elixir/exercises/connect/README.md +71 -0
- data/tracks/elixir/exercises/crypto-square/README.md +111 -0
- data/tracks/elixir/exercises/custom-set/README.md +48 -0
- data/tracks/elixir/exercises/diamond/README.md +96 -0
- data/tracks/elixir/exercises/difference-of-squares/README.md +56 -0
- data/tracks/elixir/exercises/diffie-hellman/README.md +93 -0
- data/tracks/elixir/exercises/dominoes/README.md +55 -0
- data/tracks/elixir/exercises/dot-dsl/README.md +65 -0
- data/tracks/elixir/exercises/etl/README.md +88 -0
- data/tracks/elixir/exercises/flatten-array/README.md +55 -0
- data/tracks/elixir/exercises/forth/README.md +66 -0
- data/tracks/elixir/exercises/gigasecond/README.md +48 -0
- data/tracks/elixir/exercises/grade-school/README.md +79 -0
- data/tracks/elixir/exercises/grains/README.md +71 -0
- data/tracks/elixir/exercises/grep/README.md +108 -0
- data/tracks/elixir/exercises/hamming/README.md +79 -0
- data/tracks/elixir/exercises/hello-world/README.md +58 -0
- data/tracks/elixir/exercises/hexadecimal/README.md +51 -0
- data/tracks/elixir/exercises/isogram/README.md +56 -0
- data/tracks/elixir/exercises/kindergarten-garden/README.md +103 -0
- data/tracks/elixir/exercises/largest-series-product/README.md +57 -0
- data/tracks/elixir/exercises/leap/README.md +70 -0
- data/tracks/elixir/exercises/list-ops/README.md +47 -0
- data/tracks/elixir/exercises/luhn/README.md +108 -0
- data/tracks/elixir/exercises/markdown/README.md +55 -0
- data/tracks/elixir/exercises/matrix/README.md +82 -0
- data/tracks/elixir/exercises/meetup/README.md +67 -0
- data/tracks/elixir/exercises/minesweeper/README.md +67 -0
- data/tracks/elixir/exercises/nth-prime/README.md +52 -0
- data/tracks/elixir/exercises/nucleotide-count/README.md +70 -0
- data/tracks/elixir/exercises/ocr-numbers/README.md +122 -0
- data/tracks/elixir/exercises/palindrome-products/README.md +77 -0
- data/tracks/elixir/exercises/pangram/README.md +52 -0
- data/tracks/elixir/exercises/parallel-letter-frequency/README.md +48 -0
- data/tracks/elixir/exercises/pascals-triangle/README.md +58 -0
- data/tracks/elixir/exercises/perfect-numbers/README.md +61 -0
- data/tracks/elixir/exercises/phone-number/README.md +71 -0
- data/tracks/elixir/exercises/pig-latin/README.md +61 -0
- data/tracks/elixir/exercises/poker/README.md +49 -0
- data/tracks/elixir/exercises/prime-factors/README.md +73 -0
- data/tracks/elixir/exercises/protein-translation/README.md +86 -0
- data/tracks/elixir/exercises/pythagorean-triplet/README.md +61 -0
- data/tracks/elixir/exercises/queen-attack/README.md +70 -0
- data/tracks/elixir/exercises/rail-fence-cipher/README.md +97 -0
- data/tracks/elixir/exercises/raindrops/README.md +61 -0
- data/tracks/elixir/exercises/rna-transcription/README.md +62 -0
- data/tracks/elixir/exercises/robot-simulator/README.md +71 -0
- data/tracks/elixir/exercises/roman-numerals/README.md +86 -0
- data/tracks/elixir/exercises/rotational-cipher/README.md +73 -0
- data/tracks/elixir/exercises/run-length-encoding/README.md +67 -0
- data/tracks/elixir/exercises/saddle-points/README.md +70 -0
- data/tracks/elixir/exercises/say/README.md +106 -0
- data/tracks/elixir/exercises/scale-generator/README.md +97 -0
- data/tracks/elixir/exercises/scrabble-score/README.md +81 -0
- data/tracks/elixir/exercises/secret-handshake/README.md +94 -0
- data/tracks/elixir/exercises/series/README.md +64 -0
- data/tracks/elixir/exercises/sieve/README.md +71 -0
- data/tracks/elixir/exercises/simple-cipher/README.md +127 -0
- data/tracks/elixir/exercises/simple-linked-list/README.md +65 -0
- data/tracks/elixir/exercises/space-age/README.md +61 -0
- data/tracks/elixir/exercises/strain/README.md +80 -0
- data/tracks/elixir/exercises/sublist/README.md +58 -0
- data/tracks/elixir/exercises/sum-of-multiples/README.md +55 -0
- data/tracks/elixir/exercises/tournament/README.md +110 -0
- data/tracks/elixir/exercises/triangle/README.md +63 -0
- data/tracks/elixir/exercises/twelve-days/README.md +72 -0
- data/tracks/elixir/exercises/word-count/README.md +56 -0
- data/tracks/elixir/exercises/wordy/README.md +100 -0
- data/tracks/elixir/exercises/zipper/README.md +68 -0
- data/tracks/fsharp/config/exercise_readme.go.tmpl +16 -0
- data/tracks/fsharp/exercises/accumulate/README.md +40 -0
- data/tracks/fsharp/exercises/acronym/README.md +15 -0
- data/tracks/fsharp/exercises/all-your-base/README.md +35 -0
- data/tracks/fsharp/exercises/allergies/README.md +37 -0
- data/tracks/fsharp/exercises/alphametics/README.md +41 -0
- data/tracks/fsharp/exercises/anagram/README.md +13 -0
- data/tracks/fsharp/exercises/atbash-cipher/README.md +34 -0
- data/tracks/fsharp/exercises/bank-account/README.md +30 -0
- data/tracks/fsharp/exercises/beer-song/README.md +331 -0
- data/tracks/fsharp/exercises/binary-search-tree/README.md +60 -0
- data/tracks/fsharp/exercises/binary-search/README.md +41 -0
- data/tracks/fsharp/exercises/bob/README.md +18 -0
- data/tracks/fsharp/exercises/book-store/README.md +74 -0
- data/tracks/fsharp/exercises/bowling/README.md +53 -0
- data/tracks/fsharp/exercises/bracket-push/README.md +10 -0
- data/tracks/fsharp/exercises/change/README.md +23 -0
- data/tracks/fsharp/exercises/circular-buffer/README.md +50 -0
- data/tracks/fsharp/exercises/clock/README.md +13 -0
- data/tracks/fsharp/exercises/connect/README.md +34 -0
- data/tracks/fsharp/exercises/crypto-square/README.md +74 -0
- data/tracks/fsharp/exercises/custom-set/README.md +11 -0
- data/tracks/fsharp/exercises/diamond/README.md +62 -0
- data/tracks/fsharp/exercises/difference-of-squares/README.md +25 -0
- data/tracks/fsharp/exercises/diffie-hellman/README.md +49 -0
- data/tracks/fsharp/exercises/dominoes/README.md +18 -0
- data/tracks/fsharp/exercises/dot-dsl/README.md +28 -0
- data/tracks/fsharp/exercises/error-handling/README.md +13 -0
- data/tracks/fsharp/exercises/etl/README.md +51 -0
- data/tracks/fsharp/exercises/food-chain/README.md +74 -0
- data/tracks/fsharp/exercises/forth/README.md +29 -0
- data/tracks/fsharp/exercises/gigasecond/README.md +15 -0
- data/tracks/fsharp/exercises/go-counting/README.md +37 -0
- data/tracks/fsharp/exercises/grade-school/README.md +47 -0
- data/tracks/fsharp/exercises/grains/README.md +39 -0
- data/tracks/fsharp/exercises/grep/README.md +71 -0
- data/tracks/fsharp/exercises/hamming/README.md +42 -0
- data/tracks/fsharp/exercises/hangman/README.md +21 -0
- data/tracks/fsharp/exercises/hello-world/README.md +21 -0
- data/tracks/fsharp/exercises/house/README.md +117 -0
- data/tracks/fsharp/exercises/isogram/README.md +19 -0
- data/tracks/fsharp/exercises/kindergarten-garden/README.md +66 -0
- data/tracks/fsharp/exercises/largest-series-product/README.md +20 -0
- data/tracks/fsharp/exercises/leap/README.md +33 -0
- data/tracks/fsharp/exercises/ledger/README.md +18 -0
- data/tracks/fsharp/exercises/lens-person/README.md +15 -0
- data/tracks/fsharp/exercises/linked-list/README.md +50 -0
- data/tracks/fsharp/exercises/list-ops/README.md +10 -0
- data/tracks/fsharp/exercises/luhn/README.md +71 -0
- data/tracks/fsharp/exercises/markdown/README.md +18 -0
- data/tracks/fsharp/exercises/matrix/README.md +45 -0
- data/tracks/fsharp/exercises/meetup/README.md +30 -0
- data/tracks/fsharp/exercises/minesweeper/README.md +30 -0
- data/tracks/fsharp/exercises/nth-prime/README.md +21 -0
- data/tracks/fsharp/exercises/nucleotide-count/README.md +33 -0
- data/tracks/fsharp/exercises/ocr-numbers/README.md +85 -0
- data/tracks/fsharp/exercises/palindrome-products/README.md +44 -0
- data/tracks/fsharp/exercises/pangram/README.md +15 -0
- data/tracks/fsharp/exercises/parallel-letter-frequency/README.md +15 -0
- data/tracks/fsharp/exercises/pascals-triangle/README.md +21 -0
- data/tracks/fsharp/exercises/perfect-numbers/README.md +24 -0
- data/tracks/fsharp/exercises/phone-number/README.md +34 -0
- data/tracks/fsharp/exercises/pig-latin/README.md +24 -0
- data/tracks/fsharp/exercises/poker/README.md +15 -0
- data/tracks/fsharp/exercises/pov/README.md +46 -0
- data/tracks/fsharp/exercises/prime-factors/README.md +36 -0
- data/tracks/fsharp/exercises/protein-translation/README.md +49 -0
- data/tracks/fsharp/exercises/proverb/README.md +22 -0
- data/tracks/fsharp/exercises/pythagorean-triplet/README.md +24 -0
- data/tracks/fsharp/exercises/queen-attack/README.md +33 -0
- data/tracks/fsharp/exercises/rail-fence-cipher/README.md +60 -0
- data/tracks/fsharp/exercises/raindrops/README.md +27 -0
- data/tracks/fsharp/exercises/react/README.md +19 -0
- data/tracks/fsharp/exercises/rectangles/README.md +67 -0
- data/tracks/fsharp/exercises/rna-transcription/README.md +29 -0
- data/tracks/fsharp/exercises/robot-name/README.md +22 -0
- data/tracks/fsharp/exercises/robot-simulator/README.md +34 -0
- data/tracks/fsharp/exercises/roman-numerals/README.md +49 -0
- data/tracks/fsharp/exercises/run-length-encoding/README.md +30 -0
- data/tracks/fsharp/exercises/saddle-points/README.md +33 -0
- data/tracks/fsharp/exercises/say/README.md +69 -0
- data/tracks/fsharp/exercises/scale-generator/README.md +60 -0
- data/tracks/fsharp/exercises/scrabble-score/README.md +44 -0
- data/tracks/fsharp/exercises/secret-handshake/README.md +35 -0
- data/tracks/fsharp/exercises/series/README.md +27 -0
- data/tracks/fsharp/exercises/sgf-parsing/README.md +68 -0
- data/tracks/fsharp/exercises/sieve/README.md +34 -0
- data/tracks/fsharp/exercises/simple-cipher/README.md +90 -0
- data/tracks/fsharp/exercises/simple-linked-list/README.md +28 -0
- data/tracks/fsharp/exercises/space-age/README.md +28 -0
- data/tracks/fsharp/exercises/strain/README.md +40 -0
- data/tracks/fsharp/exercises/sublist/README.md +21 -0
- data/tracks/fsharp/exercises/sum-of-multiples/README.md +18 -0
- data/tracks/fsharp/exercises/tournament/README.md +68 -0
- data/tracks/fsharp/exercises/transpose/README.md +65 -0
- data/tracks/fsharp/exercises/tree-building/README.md +30 -0
- data/tracks/fsharp/exercises/triangle/README.md +26 -0
- data/tracks/fsharp/exercises/twelve-days/README.md +39 -0
- data/tracks/fsharp/exercises/two-bucket/README.md +36 -0
- data/tracks/fsharp/exercises/variable-length-quantity/README.md +39 -0
- data/tracks/fsharp/exercises/word-count/README.md +19 -0
- data/tracks/fsharp/exercises/word-search/README.md +30 -0
- data/tracks/fsharp/exercises/wordy/README.md +68 -0
- data/tracks/fsharp/exercises/zebra-puzzle/README.md +32 -0
- data/tracks/fsharp/exercises/zipper/README.md +31 -0
- data/tracks/haskell/README.md +2 -2
- data/tracks/javascript/config.json +232 -4
- data/tracks/kotlin/config.json +8 -1
- data/tracks/kotlin/exercises/rotational-cipher/build.gradle +28 -0
- data/tracks/kotlin/exercises/rotational-cipher/src/example/kotlin/RotationalCipher.kt +18 -0
- data/tracks/kotlin/exercises/rotational-cipher/src/main/kotlin/.keep +0 -0
- data/tracks/kotlin/exercises/rotational-cipher/src/test/kotlin/RotationalCipherTest.kt +81 -0
- data/tracks/kotlin/exercises/settings.gradle +1 -0
- data/tracks/powershell/config/exercise_readme.go.tmpl +16 -0
- data/tracks/powershell/exercises/hamming/README.md +42 -0
- data/tracks/powershell/exercises/hello-world/README.md +21 -0
- data/tracks/purescript/README.md +4 -4
- data/tracks/scala/config.json +266 -6
- data/tracks/scala/config/exercise_readme.go.tmpl +16 -0
- data/tracks/scala/exercises/accumulate/README.md +46 -0
- data/tracks/scala/exercises/acronym/README.md +26 -0
- data/tracks/scala/exercises/all-your-base/README.md +46 -0
- data/tracks/scala/exercises/allergies/README.md +48 -0
- data/tracks/scala/exercises/alphametics/README.md +46 -0
- data/tracks/scala/exercises/anagram/README.md +24 -0
- data/tracks/scala/exercises/atbash-cipher/README.md +45 -0
- data/tracks/scala/exercises/bank-account/README.md +54 -0
- data/tracks/scala/exercises/beer-song/README.md +338 -0
- data/tracks/scala/exercises/binary-search-tree/README.md +71 -0
- data/tracks/scala/exercises/binary-search/README.md +52 -0
- data/tracks/scala/exercises/binary/README.md +46 -0
- data/tracks/scala/exercises/bob/README.md +29 -0
- data/tracks/scala/exercises/book-store/README.md +85 -0
- data/tracks/scala/exercises/bowling/README.md +64 -0
- data/tracks/scala/exercises/bracket-push/README.md +21 -0
- data/tracks/scala/exercises/change/README.md +34 -0
- data/tracks/scala/exercises/clock/README.md +24 -0
- data/tracks/scala/exercises/connect/README.md +53 -0
- data/tracks/scala/exercises/crypto-square/README.md +85 -0
- data/tracks/scala/exercises/custom-set/README.md +22 -0
- data/tracks/scala/exercises/difference-of-squares/README.md +30 -0
- data/tracks/scala/exercises/dominoes/README.md +29 -0
- data/tracks/scala/exercises/etl/README.md +62 -0
- data/tracks/scala/exercises/food-chain/README.md +81 -0
- data/tracks/scala/exercises/forth/README.md +40 -0
- data/tracks/scala/exercises/gigasecond/README.md +26 -0
- data/tracks/scala/exercises/grade-school/README.md +53 -0
- data/tracks/scala/exercises/grains/README.md +45 -0
- data/tracks/scala/exercises/hamming/README.md +112 -0
- data/tracks/scala/exercises/hello-world/README.md +38 -0
- data/tracks/scala/exercises/hexadecimal/README.md +25 -0
- data/tracks/scala/exercises/house/README.md +124 -0
- data/tracks/scala/exercises/isogram/README.md +30 -0
- data/tracks/scala/exercises/kindergarten-garden/README.md +77 -0
- data/tracks/scala/exercises/largest-series-product/README.md +31 -0
- data/tracks/scala/exercises/leap/README.md +50 -0
- data/tracks/scala/exercises/lens-person/README.md +11 -7
- data/tracks/scala/exercises/linked-list/README.md +45 -0
- data/tracks/scala/exercises/luhn/README.md +82 -0
- data/tracks/scala/exercises/matrix/README.md +56 -0
- data/tracks/scala/exercises/meetup/README.md +41 -0
- data/tracks/scala/exercises/minesweeper/README.md +41 -0
- data/tracks/scala/exercises/nth-prime/README.md +26 -0
- data/tracks/scala/exercises/nucleotide-count/README.md +107 -0
- data/tracks/scala/exercises/ocr-numbers/README.md +96 -0
- data/tracks/scala/exercises/octal/README.md +60 -0
- data/tracks/scala/exercises/palindrome-products/README.md +51 -0
- data/tracks/scala/exercises/pangram/README.md +26 -0
- data/tracks/scala/exercises/parallel-letter-frequency/README.md +50 -0
- data/tracks/scala/exercises/pascals-triangle/README.md +32 -0
- data/tracks/scala/exercises/perfect-numbers/README.md +35 -0
- data/tracks/scala/exercises/phone-number/README.md +56 -0
- data/tracks/scala/exercises/pig-latin/README.md +35 -0
- data/tracks/scala/exercises/prime-factors/README.md +47 -0
- data/tracks/scala/exercises/protein-translation/README.md +60 -0
- data/tracks/scala/exercises/pythagorean-triplet/README.md +35 -0
- data/tracks/scala/exercises/queen-attack/README.md +44 -0
- data/tracks/scala/exercises/rail-fence-cipher/README.md +71 -0
- data/tracks/scala/exercises/raindrops/README.md +35 -0
- data/tracks/scala/exercises/rna-transcription/README.md +36 -0
- data/tracks/scala/exercises/robot-name/README.md +40 -0
- data/tracks/scala/exercises/robot-simulator/README.md +45 -0
- data/tracks/scala/exercises/roman-numerals/README.md +72 -0
- data/tracks/scala/exercises/run-length-encoding/README.md +41 -0
- data/tracks/scala/exercises/saddle-points/README.md +44 -0
- data/tracks/scala/exercises/say/README.md +80 -0
- data/tracks/scala/exercises/scrabble-score/README.md +55 -0
- data/tracks/scala/exercises/secret-handshake/README.md +46 -0
- data/tracks/scala/exercises/series/README.md +38 -0
- data/tracks/scala/exercises/sgf-parsing/README.md +79 -0
- data/tracks/scala/exercises/sieve/README.md +45 -0
- data/tracks/scala/exercises/simple-cipher/README.md +101 -0
- data/tracks/scala/exercises/simple-linked-list/README.md +39 -0
- data/tracks/scala/exercises/space-age/README.md +35 -0
- data/tracks/scala/exercises/spiral-matrix/README.md +41 -0
- data/tracks/scala/exercises/strain/README.md +51 -0
- data/tracks/scala/exercises/sublist/README.md +32 -0
- data/tracks/scala/exercises/sum-of-multiples/README.md +29 -0
- data/tracks/scala/exercises/triangle/README.md +37 -0
- data/tracks/scala/exercises/trinary/README.md +39 -0
- data/tracks/scala/exercises/variable-length-quantity/README.md +54 -0
- data/tracks/scala/exercises/word-count/README.md +30 -0
- data/tracks/scala/exercises/wordy/README.md +74 -0
- data/tracks/scala/exercises/zebra-puzzle/README.md +43 -0
- data/tracks/scala/exercises/zipper/README.md +42 -0
- metadata +401 -1
@@ -1,14 +1,13 @@
|
|
1
1
|
# Lens Person
|
2
2
|
|
3
|
-
Use lenses to
|
3
|
+
Use lenses to update nested records (specific to languages with immutable data).
|
4
4
|
|
5
|
-
Updating fields of nested
|
6
|
-
is to use [lenses](https://wiki.haskell.org/Lens).
|
7
|
-
|
8
|
-
|
5
|
+
Updating fields of nested records is kind of annoying in Haskell. One solution
|
6
|
+
is to use [lenses](https://wiki.haskell.org/Lens). Implement several record
|
7
|
+
accessing functions using lenses, you may use any library you want. The test
|
8
|
+
suite also allows you to avoid lenses alltogether so you can experiment with
|
9
9
|
different approaches.
|
10
10
|
|
11
|
-
|
12
11
|
The Scala exercises assume an SBT project scheme. The exercise solution source
|
13
12
|
should be placed within the exercise directory/src/main/scala. The exercise
|
14
13
|
unit tests can be found within the exercise directory/src/test/scala.
|
@@ -16,4 +15,9 @@ unit tests can be found within the exercise directory/src/test/scala.
|
|
16
15
|
To run the tests simply run the command `sbt test` in the exercise directory.
|
17
16
|
|
18
17
|
For more detailed info about the Scala track see the [help
|
19
|
-
page](http://
|
18
|
+
page](http://exercism.io/languages/scala).
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
## Submitting Incomplete Solutions
|
23
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Linked List
|
2
|
+
|
3
|
+
Implement a doubly linked list.
|
4
|
+
|
5
|
+
Like an array, a linked list is a simple linear data structure. Several
|
6
|
+
common data types can be implemented using linked lists, like queues,
|
7
|
+
stacks, and associative arrays.
|
8
|
+
|
9
|
+
A linked list is a collection of data elements called *nodes*. In a
|
10
|
+
*singly linked list* each node holds a value and a link to the next node.
|
11
|
+
In a *doubly linked list* each node also holds a link to the previous
|
12
|
+
node.
|
13
|
+
|
14
|
+
You will write an implementation of a doubly linked list. Implement a
|
15
|
+
Node to hold a value and pointers to the next and previous nodes. Then
|
16
|
+
implement a List which holds references to the first and last node and
|
17
|
+
offers an array-like interface for adding and removing items:
|
18
|
+
|
19
|
+
* `push` (*insert value at back*);
|
20
|
+
* `pop` (*remove value at back*);
|
21
|
+
* `shift` (*remove value at front*).
|
22
|
+
* `unshift` (*insert value at front*);
|
23
|
+
|
24
|
+
To keep your implementation simple, the tests will not cover error
|
25
|
+
conditions. Specifically: `pop` or `shift` will never be called on an
|
26
|
+
empty list.
|
27
|
+
|
28
|
+
If you want to know more about linked lists, check [Wikipedia](https://en.wikipedia.org/wiki/Linked_list).
|
29
|
+
|
30
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
31
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
32
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
33
|
+
|
34
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
35
|
+
|
36
|
+
For more detailed info about the Scala track see the [help
|
37
|
+
page](http://exercism.io/languages/scala).
|
38
|
+
|
39
|
+
|
40
|
+
## Source
|
41
|
+
|
42
|
+
Classic computer science topic
|
43
|
+
|
44
|
+
## Submitting Incomplete Solutions
|
45
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Luhn
|
2
|
+
|
3
|
+
Given a number determine whether or not it is valid per the Luhn formula.
|
4
|
+
|
5
|
+
The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is
|
6
|
+
a simple checksum formula used to validate a variety of identification
|
7
|
+
numbers, such as credit card numbers and Canadian Social Insurance
|
8
|
+
Numbers.
|
9
|
+
|
10
|
+
The task is to check if a given string is valid.
|
11
|
+
|
12
|
+
Validating a Number
|
13
|
+
------
|
14
|
+
|
15
|
+
Strings of length 1 or less are not valid. Spaces are allowed in the input,
|
16
|
+
but they should be stripped before checking. All other non-digit characters
|
17
|
+
are disallowed.
|
18
|
+
|
19
|
+
## Example 1: valid credit card number
|
20
|
+
|
21
|
+
```
|
22
|
+
4539 1488 0343 6467
|
23
|
+
```
|
24
|
+
|
25
|
+
The first step of the Luhn algorithm is to double every second digit,
|
26
|
+
starting from the right. We will be doubling
|
27
|
+
|
28
|
+
```
|
29
|
+
4_3_ 1_8_ 0_4_ 6_6_
|
30
|
+
```
|
31
|
+
|
32
|
+
If doubling the number results in a number greater than 9 then subtract 9
|
33
|
+
from the product. The results of our doubling:
|
34
|
+
|
35
|
+
```
|
36
|
+
8569 2478 0383 3437
|
37
|
+
```
|
38
|
+
|
39
|
+
Then sum all of the digits:
|
40
|
+
|
41
|
+
```
|
42
|
+
8+5+6+9+2+4+7+8+0+3+8+3+3+4+3+7 = 80
|
43
|
+
```
|
44
|
+
|
45
|
+
If the sum is evenly divisible by 10, then the number is valid. This number is valid!
|
46
|
+
|
47
|
+
## Example 2: invalid credit card number
|
48
|
+
|
49
|
+
```
|
50
|
+
8273 1232 7352 0569
|
51
|
+
```
|
52
|
+
|
53
|
+
Double the second digits, starting from the right
|
54
|
+
|
55
|
+
```
|
56
|
+
7253 2262 5312 0539
|
57
|
+
```
|
58
|
+
|
59
|
+
Sum the digits
|
60
|
+
|
61
|
+
```
|
62
|
+
7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57
|
63
|
+
```
|
64
|
+
|
65
|
+
57 is not evenly divisible by 10, so this number is not valid.
|
66
|
+
|
67
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
68
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
69
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
70
|
+
|
71
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
72
|
+
|
73
|
+
For more detailed info about the Scala track see the [help
|
74
|
+
page](http://exercism.io/languages/scala).
|
75
|
+
|
76
|
+
|
77
|
+
## Source
|
78
|
+
|
79
|
+
The Luhn Algorithm on Wikipedia [http://en.wikipedia.org/wiki/Luhn_algorithm](http://en.wikipedia.org/wiki/Luhn_algorithm)
|
80
|
+
|
81
|
+
## Submitting Incomplete Solutions
|
82
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Matrix
|
2
|
+
|
3
|
+
Given a string representing a matrix of numbers, return the rows and columns of
|
4
|
+
that matrix.
|
5
|
+
|
6
|
+
So given a string with embedded newlines like:
|
7
|
+
|
8
|
+
> 9 8 7
|
9
|
+
> 5 3 2
|
10
|
+
> 6 6 7
|
11
|
+
|
12
|
+
representing this matrix:
|
13
|
+
|
14
|
+
```plain
|
15
|
+
0 1 2
|
16
|
+
|---------
|
17
|
+
0 | 9 8 7
|
18
|
+
1 | 5 3 2
|
19
|
+
2 | 6 6 7
|
20
|
+
```
|
21
|
+
|
22
|
+
your code should be able to spit out:
|
23
|
+
|
24
|
+
- A list of the rows, reading each row left-to-right while moving
|
25
|
+
top-to-bottom across the rows,
|
26
|
+
- A list of the columns, reading each column top-to-bottom while moving
|
27
|
+
from left-to-right.
|
28
|
+
|
29
|
+
The rows for our example matrix:
|
30
|
+
|
31
|
+
- 9, 8, 7
|
32
|
+
- 5, 3, 2
|
33
|
+
- 6, 6, 7
|
34
|
+
|
35
|
+
And its columns:
|
36
|
+
|
37
|
+
- 9, 5, 6
|
38
|
+
- 8, 3, 6
|
39
|
+
- 7, 2, 7
|
40
|
+
|
41
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
42
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
43
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
44
|
+
|
45
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
46
|
+
|
47
|
+
For more detailed info about the Scala track see the [help
|
48
|
+
page](http://exercism.io/languages/scala).
|
49
|
+
|
50
|
+
|
51
|
+
## Source
|
52
|
+
|
53
|
+
Warmup to the `saddle-points` warmup. [http://jumpstartlab.com](http://jumpstartlab.com)
|
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,41 @@
|
|
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
|
+
|
26
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
27
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
28
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
29
|
+
|
30
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
31
|
+
|
32
|
+
For more detailed info about the Scala track see the [help
|
33
|
+
page](http://exercism.io/languages/scala).
|
34
|
+
|
35
|
+
|
36
|
+
## Source
|
37
|
+
|
38
|
+
Jeremy Hinegardner mentioned a Boulder meetup that happens on the Wednesteenth of every month [https://twitter.com/copiousfreetime](https://twitter.com/copiousfreetime)
|
39
|
+
|
40
|
+
## Submitting Incomplete Solutions
|
41
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Minesweeper
|
2
|
+
|
3
|
+
Add the numbers to a minesweeper board.
|
4
|
+
|
5
|
+
Minesweeper is a popular game where the user has to find the mines using
|
6
|
+
numeric hints that indicate how many mines are directly adjacent
|
7
|
+
(horizontally, vertically, diagonally) to a square.
|
8
|
+
|
9
|
+
In this exercise you have to create some code that counts the number of
|
10
|
+
mines adjacent to a square and transforms boards like this (where `*`
|
11
|
+
indicates a mine):
|
12
|
+
|
13
|
+
+-----+
|
14
|
+
| * * |
|
15
|
+
| * |
|
16
|
+
| * |
|
17
|
+
| |
|
18
|
+
+-----+
|
19
|
+
|
20
|
+
into this:
|
21
|
+
|
22
|
+
+-----+
|
23
|
+
|1*3*1|
|
24
|
+
|13*31|
|
25
|
+
| 2*2 |
|
26
|
+
| 111 |
|
27
|
+
+-----+
|
28
|
+
|
29
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
30
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
31
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
32
|
+
|
33
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
34
|
+
|
35
|
+
For more detailed info about the Scala track see the [help
|
36
|
+
page](http://exercism.io/languages/scala).
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
## Submitting Incomplete Solutions
|
41
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Nth Prime
|
2
|
+
|
3
|
+
Given a number n, determine what the nth prime is.
|
4
|
+
|
5
|
+
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that
|
6
|
+
the 6th prime is 13.
|
7
|
+
|
8
|
+
If your language provides methods in the standard library to deal with prime
|
9
|
+
numbers, pretend they don't exist and implement them yourself.
|
10
|
+
|
11
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
12
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
13
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
14
|
+
|
15
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
16
|
+
|
17
|
+
For more detailed info about the Scala track see the [help
|
18
|
+
page](http://exercism.io/languages/scala).
|
19
|
+
|
20
|
+
|
21
|
+
## Source
|
22
|
+
|
23
|
+
A variation on Problem 7 at Project Euler [http://projecteuler.net/problem=7](http://projecteuler.net/problem=7)
|
24
|
+
|
25
|
+
## Submitting Incomplete Solutions
|
26
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# Nucleotide Count
|
2
|
+
|
3
|
+
Given a DNA string, compute how many times each nucleotide occurs in the string.
|
4
|
+
|
5
|
+
DNA is represented by an alphabet of the following symbols: 'A', 'C',
|
6
|
+
'G', and 'T'.
|
7
|
+
|
8
|
+
Each symbol represents a nucleotide, which is a fancy name for the
|
9
|
+
particular molecules that happen to make up a large part of DNA.
|
10
|
+
|
11
|
+
Shortest intro to biochemistry EVAR:
|
12
|
+
|
13
|
+
- twigs are to birds nests as
|
14
|
+
- nucleotides are to DNA and RNA as
|
15
|
+
- amino acids are to proteins as
|
16
|
+
- sugar is to starch as
|
17
|
+
- oh crap lipids
|
18
|
+
|
19
|
+
I'm not going to talk about lipids because they're crazy complex.
|
20
|
+
|
21
|
+
So back to nucleotides.
|
22
|
+
|
23
|
+
DNA contains four types of them: adenine (`A`), cytosine (`C`), guanine
|
24
|
+
(`G`), and thymine (`T`).
|
25
|
+
|
26
|
+
RNA contains a slightly different set of nucleotides, but we don't care
|
27
|
+
about that for now.
|
28
|
+
|
29
|
+
## Hints
|
30
|
+
A common use of `Either` is to indicate a computation that may possibly result in an error
|
31
|
+
(if the actual error is of no interest then the simpler `Option` type might be a better choice).
|
32
|
+
In the absence of an error the result is usually a `Right` (mnemonic: the "right" value)
|
33
|
+
whereas an error is a `Left`, for example a `Left[String]` containing an error message.
|
34
|
+
Note that in Scala 2.12 `Either` is right-biased by default, so it works as expected for operations like `filter`, `map`, `flatMap` or in a for-comprehension.
|
35
|
+
If you are unfamiliar with `Either` you may read [this tutorial](http://danielwestheide.com/blog/2013/01/02/the-neophytes-guide-to-scala-part-7-the-either-type.html). But be aware that this tutorial is about Scala versions prior to 2.12. For Scala 2.12 you can safely ignore `RightProjection` and omit `.right`.
|
36
|
+
`Either` is a so-called [Monad](https://en.wikipedia.org/wiki/Monad_(functional_programming)) which covers a "computational aspect",
|
37
|
+
in this case error handling.
|
38
|
+
Proper use of Monads can result in very concise yet elegant
|
39
|
+
and readable code. Improper use can easily result in the contrary.
|
40
|
+
Watch [this video](https://www.youtube.com/watch?v=Mw_Jnn_Y5iA) to learn more.
|
41
|
+
#### Common pitfalls that you should avoid
|
42
|
+
There are a few rules of thumbs for `Either`:
|
43
|
+
1. If you don't need it don't use it. Instead of
|
44
|
+
```scala
|
45
|
+
def add1(x: Int): Either[String, Int] = Right(x + 1)
|
46
|
+
```
|
47
|
+
better have
|
48
|
+
```scala
|
49
|
+
def add1(x: Int): Int = x + 1
|
50
|
+
```
|
51
|
+
(there is `Either.map` to apply such simple functions,
|
52
|
+
so you don't have to clutter them with `Either`).
|
53
|
+
2. Don't "unwrap" if you don't really need to.
|
54
|
+
Often there are built-in functions for your purpose. Indicators of premature
|
55
|
+
unwrapping are `isLeft/isRight` or pattern matching. For example, instead of
|
56
|
+
```scala
|
57
|
+
val x: Either[String, Int] = ...
|
58
|
+
|
59
|
+
if (x.isRight) x.right.get + 1 else x.left.get
|
60
|
+
// or
|
61
|
+
x match {
|
62
|
+
case Right(n) => n + 1
|
63
|
+
case Left(s) => s
|
64
|
+
}
|
65
|
+
```
|
66
|
+
better have
|
67
|
+
```scala
|
68
|
+
x fold (identity, _ + 1)
|
69
|
+
```
|
70
|
+
3. Monads can be used inside a for-comprehension FTW.
|
71
|
+
This is advisable when you want to "compose" several `Either` instances. Instead of
|
72
|
+
```scala
|
73
|
+
val xo: Either[String, Int] = ...
|
74
|
+
val yo: Either[String, Int] = ...
|
75
|
+
val zo: Either[String, Int] = ...
|
76
|
+
|
77
|
+
xo.flatMap(x =>
|
78
|
+
yo.flatMap(y =>
|
79
|
+
zo.map(z =>
|
80
|
+
x + y + z)))
|
81
|
+
```
|
82
|
+
better have
|
83
|
+
```scala
|
84
|
+
for {
|
85
|
+
x <- xo
|
86
|
+
y <- yo
|
87
|
+
z <- zo
|
88
|
+
} yield x + y + z
|
89
|
+
```
|
90
|
+
|
91
|
+
|
92
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
93
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
94
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
95
|
+
|
96
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
97
|
+
|
98
|
+
For more detailed info about the Scala track see the [help
|
99
|
+
page](http://exercism.io/languages/scala).
|
100
|
+
|
101
|
+
|
102
|
+
## Source
|
103
|
+
|
104
|
+
The Calculating DNA Nucleotides_problem at Rosalind [http://rosalind.info/problems/dna/](http://rosalind.info/problems/dna/)
|
105
|
+
|
106
|
+
## Submitting Incomplete Solutions
|
107
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# Ocr Numbers
|
2
|
+
|
3
|
+
Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is
|
4
|
+
represented, or whether it is garbled.
|
5
|
+
|
6
|
+
# Step One
|
7
|
+
|
8
|
+
To begin with, convert a simple binary font to a string containing 0 or 1.
|
9
|
+
|
10
|
+
The binary font uses pipes and underscores, four rows high and three columns wide.
|
11
|
+
|
12
|
+
```
|
13
|
+
_ #
|
14
|
+
| | # zero.
|
15
|
+
|_| #
|
16
|
+
# the fourth row is always blank
|
17
|
+
```
|
18
|
+
|
19
|
+
Is converted to "0"
|
20
|
+
|
21
|
+
```
|
22
|
+
#
|
23
|
+
| # one.
|
24
|
+
| #
|
25
|
+
# (blank fourth row)
|
26
|
+
```
|
27
|
+
|
28
|
+
Is converted to "1"
|
29
|
+
|
30
|
+
If the input is the correct size, but not recognizable, your program should return '?'
|
31
|
+
|
32
|
+
If the input is the incorrect size, your program should return an error.
|
33
|
+
|
34
|
+
# Step Two
|
35
|
+
|
36
|
+
Update your program to recognize multi-character binary strings, replacing garbled numbers with ?
|
37
|
+
|
38
|
+
# Step Three
|
39
|
+
|
40
|
+
Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string.
|
41
|
+
|
42
|
+
```
|
43
|
+
_
|
44
|
+
_|
|
45
|
+
|_
|
46
|
+
|
47
|
+
```
|
48
|
+
|
49
|
+
Is converted to "2"
|
50
|
+
|
51
|
+
```
|
52
|
+
_ _ _ _ _ _ _ _ #
|
53
|
+
| _| _||_||_ |_ ||_||_|| | # decimal numbers.
|
54
|
+
||_ _| | _||_| ||_| _||_| #
|
55
|
+
# fourth line is always blank
|
56
|
+
```
|
57
|
+
|
58
|
+
Is converted to "1234567890"
|
59
|
+
|
60
|
+
# Step Four
|
61
|
+
|
62
|
+
Update your program to handle multiple numbers, one per line. When converting several lines, join the lines with commas.
|
63
|
+
|
64
|
+
```
|
65
|
+
_ _
|
66
|
+
| _| _|
|
67
|
+
||_ _|
|
68
|
+
|
69
|
+
_ _
|
70
|
+
|_||_ |_
|
71
|
+
| _||_|
|
72
|
+
|
73
|
+
_ _ _
|
74
|
+
||_||_|
|
75
|
+
||_| _|
|
76
|
+
|
77
|
+
```
|
78
|
+
|
79
|
+
Is converted to "123,456,789"
|
80
|
+
|
81
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
82
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
83
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
84
|
+
|
85
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
86
|
+
|
87
|
+
For more detailed info about the Scala track see the [help
|
88
|
+
page](http://exercism.io/languages/scala).
|
89
|
+
|
90
|
+
|
91
|
+
## Source
|
92
|
+
|
93
|
+
Inspired by the Bank OCR kata [http://codingdojo.org/cgi-bin/wiki.pl?KataBankOCR](http://codingdojo.org/cgi-bin/wiki.pl?KataBankOCR)
|
94
|
+
|
95
|
+
## Submitting Incomplete Solutions
|
96
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|