trackler 2.0.6.11 → 2.0.6.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/CONTRIBUTING.md +6 -1
- data/common/exercises/difference-of-squares/metadata.yml +1 -1
- data/common/exercises/luhn/canonical-data.json +2 -2
- data/common/exercises/rectangles/canonical-data.json +25 -0
- data/common/exercises/rectangles/description.md +11 -3
- data/lib/trackler/version.rb +1 -1
- data/tracks/ceylon/config.json +9 -0
- data/tracks/ceylon/exercises/anagram/source/anagram/AnagramTest.ceylon +38 -39
- data/tracks/ceylon/exercises/bracket-push/source/bracketpush/BracketsTest.ceylon +28 -29
- data/tracks/ceylon/exercises/largest-series-product/example/Series.ceylon +13 -0
- data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/Series.ceylon +5 -0
- data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/SeriesTest.ceylon +30 -0
- data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/module.ceylon +3 -0
- data/tracks/csharp/config.json +41 -0
- data/tracks/csharp/exercises/alphametics/AlphameticsTest.cs +122 -0
- data/tracks/csharp/exercises/alphametics/Example.cs +139 -0
- data/tracks/csharp/exercises/dot-dsl/DotDslTest.cs +91 -0
- data/tracks/csharp/exercises/dot-dsl/Example.cs +90 -0
- data/tracks/csharp/exercises/dot-dsl/HINTS.md +2 -0
- data/tracks/csharp/exercises/error-handling/ErrorHandlingTest.cs +65 -0
- data/tracks/csharp/exercises/error-handling/Example.cs +34 -0
- data/tracks/csharp/exercises/exercises.csproj +1 -1
- data/tracks/csharp/exercises/hangman/Example.cs +85 -0
- data/tracks/csharp/exercises/hangman/HangmanTest.cs +140 -0
- data/tracks/csharp/exercises/ledger/Example.cs +106 -0
- data/tracks/csharp/exercises/ledger/Ledger.cs +166 -0
- data/tracks/csharp/exercises/ledger/LedgerTest.cs +168 -0
- data/tracks/elixir/exercises/allergies/allergies_test.exs +2 -2
- data/tracks/elixir/exercises/markdown/example.exs +3 -3
- data/tracks/elixir/exercises/phone-number/example.exs +0 -2
- data/tracks/elixir/exercises/queen-attack/example.exs +1 -1
- data/tracks/elixir/exercises/wordy/example.exs +6 -6
- data/tracks/elixir/exercises/zipper/zipper_test.exs +12 -12
- data/tracks/elixir/mix.exs +1 -1
- data/tracks/fsharp/config.json +8 -8
- data/tracks/fsharp/docs/ABOUT.md +4 -0
- data/tracks/fsharp/exercises/alphametics/AlphameticsTest.fs +33 -13
- data/tracks/fsharp/exercises/alphametics/Example.fs +29 -64
- data/tracks/fsharp/exercises/binary-search-tree/BinarySearchTreeTest.fs +14 -14
- data/tracks/fsharp/exercises/binary-search-tree/Example.fs +17 -14
- data/tracks/fsharp/exercises/triangle/TriangleTest.fs +0 -5
- data/tracks/go/README.md +3 -3
- data/tracks/go/config.json +10 -3
- data/tracks/go/exercises/acronym/acronym.go +5 -0
- data/tracks/go/exercises/bob/example_gen.go +1 -1
- data/tracks/go/exercises/clock/example_gen.go +1 -1
- data/tracks/go/exercises/connect/example_gen.go +1 -1
- data/tracks/go/exercises/custom-set/example_gen.go +1 -1
- data/tracks/go/exercises/gigasecond/example_gen.go +1 -1
- data/tracks/go/exercises/hamming/example_gen.go +1 -1
- data/tracks/go/exercises/largest-series-product/example_gen.go +1 -1
- data/tracks/go/exercises/leap/cases_test.go +5 -7
- data/tracks/go/exercises/leap/example.go +1 -1
- data/tracks/go/exercises/leap/example_gen.go +1 -1
- data/tracks/go/exercises/leap/leap.go +1 -1
- data/tracks/go/exercises/leap/leap_test.go +1 -1
- data/tracks/go/exercises/meetup/example_gen.go +1 -1
- data/tracks/go/exercises/nucleotide-count/nucleotide_count_test.go +0 -5
- data/tracks/go/exercises/pangram/pangram.go +5 -0
- data/tracks/go/exercises/raindrops/example_gen.go +1 -1
- data/tracks/go/exercises/rna-transcription/example_gen.go +1 -1
- data/tracks/go/exercises/roman-numerals/example_gen.go +1 -1
- data/tracks/go/exercises/word-count/example_gen.go +1 -1
- data/tracks/go/gen/gen.go +3 -2
- data/tracks/haskell/exercises/accumulate/src/Accumulate.hs +1 -1
- data/tracks/haskell/exercises/all-your-base/src/Base.hs +1 -1
- data/tracks/haskell/exercises/allergies/src/Allergies.hs +2 -2
- data/tracks/haskell/exercises/alphametics/src/Alphametics.hs +1 -1
- data/tracks/haskell/exercises/anagram/src/Anagram.hs +1 -1
- data/tracks/haskell/exercises/atbash-cipher/src/Atbash.hs +2 -2
- data/tracks/haskell/exercises/bank-account/src/BankAccount.hs +4 -4
- data/tracks/haskell/exercises/binary/src/Binary.hs +1 -1
- data/tracks/haskell/exercises/binary-search-tree/src/BST.hs +8 -8
- data/tracks/haskell/exercises/bob/src/Bob.hs +1 -1
- data/tracks/haskell/exercises/bowling/src/Bowling.hs +1 -1
- data/tracks/haskell/exercises/change/src/Change.hs +1 -1
- data/tracks/haskell/exercises/clock/src/Clock.hs +4 -4
- data/tracks/haskell/exercises/connect/src/Connect.hs +1 -1
- data/tracks/haskell/exercises/crypto-square/src/CryptoSquare.hs +1 -1
- data/tracks/haskell/exercises/custom-set/src/CustomSet.hs +13 -13
- data/tracks/haskell/exercises/difference-of-squares/src/Squares.hs +3 -3
- data/tracks/haskell/exercises/dominoes/src/Dominoes.hs +1 -1
- data/tracks/haskell/exercises/etl/src/ETL.hs +1 -1
- data/tracks/haskell/exercises/forth/src/Forth.hs +3 -3
- data/tracks/haskell/exercises/gigasecond/src/Gigasecond.hs +1 -1
- data/tracks/haskell/exercises/go-counting/src/Counting.hs +2 -2
- data/tracks/haskell/exercises/grade-school/src/School.hs +4 -4
- data/tracks/haskell/exercises/grains/src/Grains.hs +2 -2
- data/tracks/haskell/exercises/hamming/src/Hamming.hs +1 -1
- data/tracks/haskell/exercises/hexadecimal/src/Hexadecimal.hs +1 -1
- data/tracks/haskell/exercises/kindergarten-garden/src/Garden.hs +3 -3
- data/tracks/haskell/exercises/largest-series-product/src/Series.hs +1 -1
- data/tracks/haskell/exercises/leap/src/LeapYear.hs +1 -1
- data/tracks/haskell/exercises/lens-person/src/Person.hs +4 -4
- data/tracks/haskell/exercises/linked-list/src/Deque.hs +5 -5
- data/tracks/haskell/exercises/list-ops/src/ListOps.hs +8 -8
- data/tracks/haskell/exercises/luhn/src/Luhn.hs +5 -5
- data/tracks/haskell/exercises/matrix/src/Matrix.hs +10 -10
- data/tracks/haskell/exercises/meetup/src/Meetup.hs +1 -1
- data/tracks/haskell/exercises/minesweeper/src/Minesweeper.hs +1 -1
- data/tracks/haskell/exercises/nth-prime/src/Prime.hs +1 -1
- data/tracks/haskell/exercises/nucleotide-count/src/DNA.hs +2 -2
- data/tracks/haskell/exercises/ocr-numbers/src/OCR.hs +1 -1
- data/tracks/haskell/exercises/octal/src/Octal.hs +2 -2
- data/tracks/haskell/exercises/palindrome-products/src/Palindromes.hs +2 -2
- data/tracks/haskell/exercises/parallel-letter-frequency/src/Frequency.hs +1 -1
- data/tracks/haskell/exercises/pascals-triangle/src/Triangle.hs +1 -1
- data/tracks/haskell/exercises/phone-number/src/Phone.hs +3 -3
- data/tracks/haskell/exercises/pig-latin/src/PigLatin.hs +1 -1
- data/tracks/haskell/exercises/pov/src/POV.hs +2 -2
- data/tracks/haskell/exercises/prime-factors/src/PrimeFactors.hs +1 -1
- data/tracks/haskell/exercises/pythagorean-triplet/src/Triplet.hs +3 -3
- data/tracks/haskell/exercises/queen-attack/src/Queens.hs +2 -2
- data/tracks/haskell/exercises/raindrops/src/Raindrops.hs +1 -1
- data/tracks/haskell/exercises/rna-transcription/src/DNA.hs +1 -1
- data/tracks/haskell/exercises/robot-name/src/Robot.hs +3 -3
- data/tracks/haskell/exercises/robot-simulator/src/Robot.hs +6 -6
- data/tracks/haskell/exercises/roman-numerals/src/Roman.hs +1 -1
- data/tracks/haskell/exercises/run-length-encoding/src/RunLength.hs +2 -2
- data/tracks/haskell/exercises/saddle-points/src/Matrix.hs +1 -1
- data/tracks/haskell/exercises/say/src/Say.hs +1 -1
- data/tracks/haskell/exercises/scrabble-score/src/Scrabble.hs +2 -2
- data/tracks/haskell/exercises/secret-handshake/src/SecretHandshake.hs +1 -1
- data/tracks/haskell/exercises/series/src/Series.hs +1 -1
- data/tracks/haskell/exercises/sgf-parsing/src/Sgf.hs +1 -1
- data/tracks/haskell/exercises/sieve/src/Sieve.hs +1 -1
- data/tracks/haskell/exercises/simple-cipher/src/Cipher.hs +3 -3
- data/tracks/haskell/exercises/simple-linked-list/src/LinkedList.hs +8 -8
- data/tracks/haskell/exercises/space-age/src/SpaceAge.hs +1 -1
- data/tracks/haskell/exercises/strain/src/Strain.hs +2 -2
- data/tracks/haskell/exercises/sublist/src/Sublist.hs +1 -1
- data/tracks/haskell/exercises/sum-of-multiples/src/SumOfMultiples.hs +1 -1
- data/tracks/haskell/exercises/triangle/src/Triangle.hs +1 -1
- data/tracks/haskell/exercises/trinary/src/Trinary.hs +2 -2
- data/tracks/haskell/exercises/word-count/src/WordCount.hs +1 -1
- data/tracks/haskell/exercises/wordy/src/WordProblem.hs +1 -1
- data/tracks/haskell/exercises/zebra-puzzle/src/ZebraPuzzle.hs +1 -1
- data/tracks/haskell/exercises/zipper/src/Zipper.hs +9 -9
- data/tracks/java/docs/MAINTAINING.md +48 -0
- data/tracks/java/exercises/queen-attack/src/test/java/QueenAttackCalculatorTest.java +51 -51
- data/tracks/kotlin/exercises/etl/src/example/kotlin/ETL.kt +1 -1
- data/tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt +19 -19
- data/tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt +5 -0
- data/tracks/lisp/docs/ABOUT.md +9 -0
- data/tracks/lua/exercises/transpose/example.lua +1 -1
- data/tracks/lua/exercises/transpose/transpose_spec.lua +16 -0
- data/tracks/pascal/config.json +36 -36
- data/tracks/pascal/exercises/bob/uBobTests.pas +0 -1
- data/tracks/pascal/exercises/hamming/uHammingTests.pas +0 -1
- data/tracks/pascal/exercises/leap/uLeapTests.pas +0 -1
- data/tracks/pascal/exercises/saddle-points/uSaddlePointsExample.pas +11 -0
- data/tracks/pascal/exercises/saddle-points/uSaddlePointsTests.pas +9 -1
- data/tracks/perl6/exercises/atbash-cipher/cipher.t +1 -1
- data/tracks/php/config.json +7 -0
- data/tracks/php/exercises/robot-simulator/example.php +148 -0
- data/tracks/php/exercises/robot-simulator/robot-simulator_test.php +168 -0
- data/tracks/pony/config.json +16 -7
- data/tracks/pony/exercises/roman-numerals/example.pony +35 -0
- data/tracks/pony/exercises/roman-numerals/test.pony +45 -0
- data/tracks/python/requirements-travis.txt +1 -1
- data/tracks/ruby/.rubocop.yml +1 -1
- data/tracks/ruby/bin/enable-executable +1 -1
- data/tracks/ruby/bin/executable-tests-check +1 -1
- data/tracks/ruby/exercises/acronym/example.tt +2 -3
- data/tracks/ruby/exercises/all-your-base/example.tt +2 -2
- data/tracks/ruby/exercises/alphametics/example.tt +2 -2
- data/tracks/ruby/exercises/anagram/example.tt +2 -3
- data/tracks/ruby/exercises/binary/example.tt +2 -3
- data/tracks/ruby/exercises/bowling/example.tt +2 -3
- data/tracks/ruby/exercises/bracket-push/example.tt +2 -3
- data/tracks/ruby/exercises/clock/example.tt +2 -3
- data/tracks/ruby/exercises/connect/example.rb +1 -1
- data/tracks/ruby/exercises/connect/example.tt +1 -1
- data/tracks/ruby/exercises/custom-set/example.tt +2 -3
- data/tracks/ruby/exercises/diamond/example.rb +1 -1
- data/tracks/ruby/exercises/difference-of-squares/example.tt +2 -3
- data/tracks/ruby/exercises/dominoes/example.tt +2 -2
- data/tracks/ruby/exercises/gigasecond/example.tt +2 -3
- data/tracks/ruby/exercises/grains/example.tt +2 -2
- data/tracks/ruby/exercises/hamming/example.tt +2 -3
- data/tracks/ruby/exercises/hello-world/example.tt +1 -2
- data/tracks/ruby/exercises/isogram/example.tt +2 -2
- data/tracks/ruby/exercises/largest-series-product/example.tt +2 -4
- data/tracks/ruby/exercises/leap/example.tt +2 -3
- data/tracks/ruby/exercises/nth-prime/example.tt +2 -4
- data/tracks/ruby/exercises/pangram/example.tt +2 -2
- data/tracks/ruby/exercises/queen-attack/example.tt +2 -3
- data/tracks/ruby/exercises/raindrops/example.tt +2 -3
- data/tracks/ruby/exercises/rna-transcription/example.tt +2 -3
- data/tracks/ruby/exercises/roman-numerals/example.tt +2 -3
- data/tracks/ruby/exercises/run-length-encoding/example.tt +2 -3
- data/tracks/ruby/exercises/sieve/example.tt +2 -4
- data/tracks/ruby/exercises/simple-linked-list/simple_linked_list_test.rb +6 -6
- data/tracks/ruby/exercises/tournament/example.tt +2 -3
- data/tracks/ruby/exercises/transpose/example.tt +2 -3
- data/tracks/ruby/exercises/triangle/example.tt +2 -3
- data/tracks/ruby/exercises/two-bucket/example.tt +2 -3
- data/tracks/ruby/exercises/word-count/example.tt +2 -3
- data/tracks/ruby/exercises/wordy/example.tt +2 -2
- data/tracks/ruby/lib/acronym_cases.rb +2 -0
- data/tracks/ruby/lib/all_your_base_cases.rb +3 -1
- data/tracks/ruby/lib/alphametics_cases.rb +6 -4
- data/tracks/ruby/lib/anagram_cases.rb +2 -0
- data/tracks/ruby/lib/binary_cases.rb +2 -0
- data/tracks/ruby/lib/bowling_cases.rb +2 -0
- data/tracks/ruby/lib/bracket_push_cases.rb +2 -0
- data/tracks/ruby/lib/clock_cases.rb +2 -0
- data/tracks/ruby/lib/connect_cases.rb +2 -0
- data/tracks/ruby/lib/custom_set_cases.rb +2 -0
- data/tracks/ruby/lib/difference_of_squares_cases.rb +2 -0
- data/tracks/ruby/lib/dominoes_cases.rb +2 -0
- data/tracks/ruby/lib/exercise_cases.rb +2 -0
- data/tracks/ruby/lib/generator/files/track_files.rb +3 -3
- data/tracks/ruby/lib/generator/files.rb +1 -1
- data/tracks/ruby/lib/generator/template_values.rb +5 -14
- data/tracks/ruby/lib/gigasecond_cases.rb +2 -0
- data/tracks/ruby/lib/grains_cases.rb +3 -1
- data/tracks/ruby/lib/hamming_cases.rb +2 -0
- data/tracks/ruby/lib/hello_world_cases.rb +2 -0
- data/tracks/ruby/lib/isogram_cases.rb +3 -1
- data/tracks/ruby/lib/largest_series_product_cases.rb +2 -0
- data/tracks/ruby/lib/leap_cases.rb +2 -0
- data/tracks/ruby/lib/nth_prime_cases.rb +2 -0
- data/tracks/ruby/lib/pangram_cases.rb +3 -1
- data/tracks/ruby/lib/queen_attack_cases.rb +2 -0
- data/tracks/ruby/lib/raindrops_cases.rb +2 -0
- data/tracks/ruby/lib/rna_transcription_cases.rb +2 -0
- data/tracks/ruby/lib/roman_numerals_cases.rb +2 -0
- data/tracks/ruby/lib/run_length_encoding_cases.rb +2 -0
- data/tracks/ruby/lib/sieve_cases.rb +2 -0
- data/tracks/ruby/lib/tournament_cases.rb +2 -0
- data/tracks/ruby/lib/transpose_cases.rb +2 -0
- data/tracks/ruby/lib/triangle_cases.rb +2 -0
- data/tracks/ruby/lib/two_bucket_cases.rb +2 -0
- data/tracks/ruby/lib/word_count_cases.rb +2 -0
- data/tracks/ruby/lib/wordy_cases.rb +2 -0
- data/tracks/ruby/test/fixtures/xruby/exercises/alpha/example.tt +2 -2
- data/tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb +1 -1
- data/tracks/ruby/test/generator/command_line_test.rb +1 -1
- data/tracks/ruby/test/generator/template_values_test.rb +7 -7
- data/tracks/rust/.travis.yml +4 -0
- data/tracks/rust/_test/check-exercises.sh +11 -2
- data/tracks/rust/config.json +9 -0
- data/tracks/rust/exercises/luhn/.gitignore +7 -0
- data/tracks/rust/exercises/luhn/Cargo.toml +3 -0
- data/tracks/rust/exercises/luhn/example.rs +13 -0
- data/tracks/rust/exercises/luhn/tests/luhn.rs +38 -0
- data/tracks/rust/exercises/parallel-letter-frequency/HINTS.md +32 -0
- data/tracks/rust/exercises/parallel-letter-frequency/benches/benchmark.rs +99 -0
- data/tracks/scala/config.json +57 -1
- data/tracks/scala/exercises/allergies/build.sbt +2 -2
- data/tracks/scala/exercises/atbash-cipher/build.sbt +2 -2
- data/tracks/scala/exercises/bank-account/build.sbt +3 -2
- data/tracks/scala/exercises/binary-search-tree/build.sbt +2 -2
- data/tracks/scala/exercises/clock/build.sbt +2 -2
- data/tracks/scala/exercises/crypto-square/build.sbt +2 -2
- data/tracks/scala/exercises/custom-set/build.sbt +3 -2
- data/tracks/scala/exercises/food-chain/build.sbt +3 -2
- data/tracks/scala/exercises/house/build.sbt +2 -2
- data/tracks/scala/exercises/kindergarten-garden/build.sbt +3 -2
- data/tracks/scala/exercises/largest-series-product/build.sbt +2 -2
- data/tracks/scala/exercises/linked-list/build.sbt +3 -2
- data/tracks/scala/exercises/matrix/build.sbt +2 -2
- data/tracks/scala/exercises/minesweeper/build.sbt +2 -2
- data/tracks/scala/exercises/nth-prime/build.sbt +2 -2
- data/tracks/scala/exercises/ocr-numbers/build.sbt +2 -2
- data/tracks/scala/exercises/palindrome-products/build.sbt +2 -2
- data/tracks/scala/exercises/prime-factors/build.sbt +3 -2
- data/tracks/scala/exercises/queen-attack/build.sbt +2 -2
- data/tracks/scala/exercises/raindrops/build.sbt +2 -2
- data/tracks/scala/exercises/robot-simulator/build.sbt +2 -2
- data/tracks/scala/exercises/triangle/build.sbt +2 -2
- data/tracks/scala/exercises/trinary/build.sbt +2 -2
- data/tracks/scala/exercises/wordy/build.sbt +3 -3
- metadata +33 -2
@@ -1,10 +1,10 @@
|
|
1
1
|
module Cipher (caesarDecode, caesarEncode, caesarEncodeRandom) where
|
2
2
|
|
3
3
|
caesarDecode :: String -> String -> String
|
4
|
-
caesarDecode =
|
4
|
+
caesarDecode = error "You need to implement this function."
|
5
5
|
|
6
6
|
caesarEncode :: String -> String -> String
|
7
|
-
caesarEncode =
|
7
|
+
caesarEncode = error "You need to implement this function."
|
8
8
|
|
9
9
|
caesarEncodeRandom :: String -> IO (String, String)
|
10
|
-
caesarEncodeRandom =
|
10
|
+
caesarEncodeRandom = error "You need to implement this function."
|
@@ -13,25 +13,25 @@ module LinkedList
|
|
13
13
|
data LinkedList a = Dummy
|
14
14
|
|
15
15
|
datum :: LinkedList a -> a
|
16
|
-
datum =
|
16
|
+
datum = error "You need to implement this function."
|
17
17
|
|
18
18
|
fromList :: [a] -> LinkedList a
|
19
|
-
fromList =
|
19
|
+
fromList = error "You need to implement this function."
|
20
20
|
|
21
21
|
isNil :: LinkedList a -> Bool
|
22
|
-
isNil =
|
22
|
+
isNil = error "You need to implement this function."
|
23
23
|
|
24
24
|
new :: a -> LinkedList a -> LinkedList a
|
25
|
-
new =
|
25
|
+
new = error "You need to implement this function."
|
26
26
|
|
27
27
|
next :: LinkedList a -> LinkedList a
|
28
|
-
next =
|
28
|
+
next = error "You need to implement this function."
|
29
29
|
|
30
30
|
nil :: LinkedList a
|
31
|
-
nil =
|
31
|
+
nil = error "You need to implement this function."
|
32
32
|
|
33
33
|
reverseLinkedList :: LinkedList a -> LinkedList a
|
34
|
-
reverseLinkedList =
|
34
|
+
reverseLinkedList = error "You need to implement this function."
|
35
35
|
|
36
36
|
toList :: LinkedList a -> [a]
|
37
|
-
toList =
|
37
|
+
toList = error "You need to implement this function."
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Strain (keep, discard) where
|
2
2
|
|
3
3
|
discard :: (a -> Bool) -> [a] -> [a]
|
4
|
-
discard =
|
4
|
+
discard = error "You need to implement this function."
|
5
5
|
|
6
6
|
keep :: (a -> Bool) -> [a] -> [a]
|
7
|
-
keep =
|
7
|
+
keep = error "You need to implement this function."
|
@@ -19,28 +19,28 @@ data BinTree a = BT { btValue :: a
|
|
19
19
|
data Zipper a = Dummy deriving (Eq, Show)
|
20
20
|
|
21
21
|
fromTree :: BinTree a -> Zipper a
|
22
|
-
fromTree =
|
22
|
+
fromTree = error "You need to implement this function."
|
23
23
|
|
24
24
|
toTree :: Zipper a -> BinTree a
|
25
|
-
toTree =
|
25
|
+
toTree = error "You need to implement this function."
|
26
26
|
|
27
27
|
value :: Zipper a -> a
|
28
|
-
value =
|
28
|
+
value = error "You need to implement this function."
|
29
29
|
|
30
30
|
left :: Zipper a -> Maybe (Zipper a)
|
31
|
-
left =
|
31
|
+
left = error "You need to implement this function."
|
32
32
|
|
33
33
|
right :: Zipper a -> Maybe (Zipper a)
|
34
|
-
right =
|
34
|
+
right = error "You need to implement this function."
|
35
35
|
|
36
36
|
up :: Zipper a -> Maybe (Zipper a)
|
37
|
-
up =
|
37
|
+
up = error "You need to implement this function."
|
38
38
|
|
39
39
|
setValue :: a -> Zipper a -> Zipper a
|
40
|
-
setValue =
|
40
|
+
setValue = error "You need to implement this function."
|
41
41
|
|
42
42
|
setLeft :: Maybe (BinTree a) -> Zipper a -> Zipper a
|
43
|
-
setLeft =
|
43
|
+
setLeft = error "You need to implement this function."
|
44
44
|
|
45
45
|
setRight :: Maybe (BinTree a) -> Zipper a -> Zipper a
|
46
|
-
setRight =
|
46
|
+
setRight = error "You need to implement this function."
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Welcome!
|
2
|
+
|
3
|
+
This is a guide/reference for maintainers of the Java track.
|
4
|
+
|
5
|
+
- [Your New Permissions](#your-new-permissions)
|
6
|
+
- [Maintainer Guides](#maintainer-guides)
|
7
|
+
- [The Project Board](#the-project-board)
|
8
|
+
- [Miscellaneous](#miscellaneous)
|
9
|
+
|
10
|
+
## Your New Permissions
|
11
|
+
|
12
|
+
You now have write access to four repositories. "write access" means you can: review, reject, accept and merge PRs; and push changes to these repos. Despite having permissions to push, we tend to see review of even our own PRs.
|
13
|
+
|
14
|
+
- [x-common](https://github.com/exercism/x-common) — the library of exercises.
|
15
|
+
- [discussions](https://github.com/exercism/discussions) — the place where project-wide conversations happen.
|
16
|
+
[issues sorted by most recently updated.](https://github.com/exercism/discussions/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
|
17
|
+
- [xjava](https://github.com/exercism/xjava) — yeah... you know what this one is. :)
|
18
|
+
- [todo](https://github.com/exercism/todo) — not really used... might just go away completely in the future.
|
19
|
+
|
20
|
+
## Maintainer Guides
|
21
|
+
|
22
|
+
- **[exercism.io/docs/maintaining-a-track.md](https://github.com/exercism/exercism.io/blob/master/docs/maintaining-a-track.md)**
|
23
|
+
- [exercism.io/docs/getting-involved-in-a-track.md](https://github.com/exercism/exercism.io/blob/master/docs/getting-involved-in-a-track.md)
|
24
|
+
- [exercism.io/docs/reviewing-a-pull-request.md](https://github.com/exercism/exercism.io/blob/master/docs/reviewing-a-pull-request.md)
|
25
|
+
|
26
|
+
## The Project Board
|
27
|
+
|
28
|
+
GitHub issues are great, there's no way to easily set priorities.
|
29
|
+
To do this, we're using a GitHub Project: https://github.com/exercism/xjava/projects/2.
|
30
|
+
|
31
|
+
- **Epics** — issues that really represent bigger ideas. These inspire creating a set of smaller issues to be elaborated...
|
32
|
+
- **Icebox** — issues that just needs a little more detail to be "ready to play"...
|
33
|
+
- **Backlog** — issues ready to be worked. When we start working on an issue, we move it to the next column...
|
34
|
+
- **Current** — issues in progress. When we've considered it done, we move the card to...
|
35
|
+
- **Delivered** — completed issues that could use another pair of eyes. When these are reviewed they get moved to...
|
36
|
+
- **Done** — issues we've complete. Every so often, we get together and it's nice to review what we've completed.
|
37
|
+
Once reviewed, we remove them from this Project.
|
38
|
+
|
39
|
+
The point of this board is to make clear our shared priorities. It's a tool you can use.
|
40
|
+
However, if you have an idea and want to implement it, you can just do it; it does not have to be added to this board.
|
41
|
+
|
42
|
+
## Miscellaneous
|
43
|
+
|
44
|
+
- Issues marked with "policy" are current "team agreements": [exercism?label:policy](https://github.com/search?q=org%3Aexercism+label%3Apolicy).
|
45
|
+
This label is described in [discussions#96](https://github.com/exercism/discussions/issues/96).
|
46
|
+
- Exercism has a Twitter account: [@Exercism.io](https://twitter.com/exercism_io); and a mailing list: https://tinyletter.com/exercism
|
47
|
+
|
48
|
+
**Please feel free to ask any questions. In our thinking, asking questions is far smarter than guessing.**
|
@@ -16,119 +16,119 @@ public final class QueenAttackCalculatorTest {
|
|
16
16
|
public ExpectedException expectedException = ExpectedException.none();
|
17
17
|
|
18
18
|
@Test
|
19
|
-
public void
|
20
|
-
|
21
|
-
|
19
|
+
public void testQueensThatDoNotShareRankFileOrDiagonalCannotAttack() {
|
20
|
+
final QueenAttackCalculator calculator
|
21
|
+
= new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(6, 6));
|
22
22
|
|
23
|
-
|
23
|
+
assertFalse(calculator.canQueensAttackOneAnother());
|
24
24
|
}
|
25
25
|
|
26
26
|
@Ignore
|
27
27
|
@Test
|
28
|
-
public void
|
29
|
-
|
30
|
-
|
28
|
+
public void testQueensCanAttackOnTheSameRank() {
|
29
|
+
final QueenAttackCalculator calculator
|
30
|
+
= new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(2, 6));
|
31
31
|
|
32
|
-
|
32
|
+
assertTrue(calculator.canQueensAttackOneAnother());
|
33
33
|
}
|
34
34
|
|
35
35
|
@Ignore
|
36
36
|
@Test
|
37
|
-
public void
|
38
|
-
|
39
|
-
|
37
|
+
public void testQueensCanAttackOnTheSameFile() {
|
38
|
+
final QueenAttackCalculator calculator
|
39
|
+
= new QueenAttackCalculator(new BoardCoordinate(4, 5), new BoardCoordinate(2, 5));
|
40
40
|
|
41
|
-
|
41
|
+
assertTrue(calculator.canQueensAttackOneAnother());
|
42
42
|
}
|
43
43
|
|
44
44
|
@Ignore
|
45
45
|
@Test
|
46
|
-
public void
|
47
|
-
|
48
|
-
|
46
|
+
public void testQueensCanAttackOnFirstDiagonal() {
|
47
|
+
final QueenAttackCalculator calculator
|
48
|
+
= new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(0, 4));
|
49
49
|
|
50
|
-
|
50
|
+
assertTrue(calculator.canQueensAttackOneAnother());
|
51
51
|
}
|
52
52
|
|
53
53
|
@Ignore
|
54
54
|
@Test
|
55
|
-
public void
|
56
|
-
|
57
|
-
|
55
|
+
public void testQueensCanAttackOnSecondDiagonal() {
|
56
|
+
final QueenAttackCalculator calculator
|
57
|
+
= new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(3, 1));
|
58
58
|
|
59
|
-
|
59
|
+
assertTrue(calculator.canQueensAttackOneAnother());
|
60
60
|
}
|
61
61
|
|
62
62
|
@Ignore
|
63
63
|
@Test
|
64
|
-
public void
|
65
|
-
|
66
|
-
|
64
|
+
public void testQueensCanAttackOnThirdDiagonal() {
|
65
|
+
final QueenAttackCalculator calculator
|
66
|
+
= new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(1, 1));
|
67
67
|
|
68
|
-
|
68
|
+
assertTrue(calculator.canQueensAttackOneAnother());
|
69
69
|
}
|
70
70
|
|
71
71
|
@Ignore
|
72
72
|
@Test
|
73
|
-
public void
|
73
|
+
public void testQueensCanAttackOnFourthDiagonal() {
|
74
74
|
final QueenAttackCalculator calculator
|
75
|
-
= new QueenAttackCalculator(new BoardCoordinate(2,
|
75
|
+
= new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(5, 5));
|
76
76
|
|
77
|
-
|
77
|
+
assertTrue(calculator.canQueensAttackOneAnother());
|
78
78
|
}
|
79
79
|
|
80
80
|
@Ignore
|
81
81
|
@Test
|
82
|
-
public void
|
83
|
-
|
84
|
-
|
82
|
+
public void testCoordinateWithNegativeRankNotAllowed() {
|
83
|
+
expectedException.expect(IllegalArgumentException.class);
|
84
|
+
expectedException.expectMessage("Coordinate must have positive rank.");
|
85
85
|
|
86
|
-
|
86
|
+
new BoardCoordinate(-2, 2);
|
87
87
|
}
|
88
88
|
|
89
89
|
@Ignore
|
90
90
|
@Test
|
91
|
-
public void
|
92
|
-
|
93
|
-
|
91
|
+
public void testCoordinateWithRankGreaterThan7NotAllowed() {
|
92
|
+
expectedException.expect(IllegalArgumentException.class);
|
93
|
+
expectedException.expectMessage("Coordinate must have rank <= 7.");
|
94
94
|
|
95
|
-
|
95
|
+
new BoardCoordinate(8, 4);
|
96
96
|
}
|
97
97
|
|
98
98
|
@Ignore
|
99
99
|
@Test
|
100
|
-
public void
|
101
|
-
|
102
|
-
|
100
|
+
public void testCoordinateWithNegativeFileNotAllowed() {
|
101
|
+
expectedException.expect(IllegalArgumentException.class);
|
102
|
+
expectedException.expectMessage("Coordinate must have positive file.");
|
103
103
|
|
104
|
-
|
104
|
+
new BoardCoordinate(2, -2);
|
105
105
|
}
|
106
106
|
|
107
107
|
@Ignore
|
108
108
|
@Test
|
109
|
-
public void
|
110
|
-
|
111
|
-
|
109
|
+
public void testCoordinateWithFileGreaterThan7NotAllowed() {
|
110
|
+
expectedException.expect(IllegalArgumentException.class);
|
111
|
+
expectedException.expectMessage("Coordinate must have file <= 7.");
|
112
112
|
|
113
|
-
|
113
|
+
new BoardCoordinate(4, 8);
|
114
114
|
}
|
115
115
|
|
116
116
|
@Ignore
|
117
117
|
@Test
|
118
|
-
public void
|
119
|
-
|
120
|
-
|
118
|
+
public void testNullCoordinateNotAllowed() {
|
119
|
+
expectedException.expect(IllegalArgumentException.class);
|
120
|
+
expectedException.expectMessage("You must supply valid board coordinates for both Queens.");
|
121
121
|
|
122
|
-
|
122
|
+
new QueenAttackCalculator(null, new BoardCoordinate(0, 7));
|
123
123
|
}
|
124
124
|
|
125
125
|
@Ignore
|
126
126
|
@Test
|
127
|
-
public void
|
128
|
-
|
129
|
-
|
127
|
+
public void testQueensMustNotOccupyTheSameSquare() {
|
128
|
+
expectedException.expect(IllegalArgumentException.class);
|
129
|
+
expectedException.expectMessage("Queens may not occupy the same board coordinate.");
|
130
130
|
|
131
|
-
|
131
|
+
new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(2, 2));
|
132
132
|
}
|
133
133
|
|
134
134
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
object ETL {
|
2
|
-
fun transform(old: Map<Int, Collection<
|
2
|
+
fun transform(old: Map<Int, Collection<Char>>): Map<Char, Int> {
|
3
3
|
return old.flatMap { mapEntry -> mapEntry.value.map { word -> Pair(word.toLowerCase(), mapEntry.key) } }.toMap()
|
4
4
|
}
|
5
5
|
}
|
@@ -5,24 +5,24 @@ class ETLTest {
|
|
5
5
|
|
6
6
|
@Test
|
7
7
|
fun transformOneValue() {
|
8
|
-
val old = mapOf(1 to listOf(
|
9
|
-
val expected = mapOf(
|
8
|
+
val old = mapOf(1 to listOf('a'))
|
9
|
+
val expected = mapOf('a' to 1)
|
10
10
|
|
11
11
|
assertEquals(expected, ETL.transform(old))
|
12
12
|
}
|
13
13
|
|
14
14
|
@Test
|
15
15
|
fun transformMoreValues() {
|
16
|
-
val old = mapOf(1 to listOf(
|
17
|
-
val expected = mapOf(
|
16
|
+
val old = mapOf(1 to listOf('A', 'E', 'I'))
|
17
|
+
val expected = mapOf('a' to 1, 'e' to 1, 'i' to 1)
|
18
18
|
|
19
19
|
assertEquals(expected, ETL.transform(old))
|
20
20
|
}
|
21
21
|
|
22
22
|
@Test
|
23
23
|
fun moreKeys() {
|
24
|
-
val old = mapOf(1 to listOf(
|
25
|
-
val expected = mapOf(
|
24
|
+
val old = mapOf(1 to listOf('A', 'E', 'I'), 2 to listOf('D', 'G'))
|
25
|
+
val expected = mapOf('a' to 1, 'e' to 1, 'i' to 1, 'd' to 2, 'g' to 2)
|
26
26
|
|
27
27
|
assertEquals(expected, ETL.transform(old))
|
28
28
|
}
|
@@ -30,21 +30,21 @@ class ETLTest {
|
|
30
30
|
@Test
|
31
31
|
fun fullDataset() {
|
32
32
|
val old = mapOf(
|
33
|
-
1 to listOf(
|
34
|
-
2 to listOf(
|
35
|
-
3 to listOf(
|
36
|
-
4 to listOf(
|
37
|
-
5 to listOf(
|
38
|
-
8 to listOf(
|
39
|
-
10 to listOf(
|
33
|
+
1 to listOf('A', 'E', 'I', 'O', 'U', 'L', 'N', 'R', 'S', 'T'),
|
34
|
+
2 to listOf('D', 'G'),
|
35
|
+
3 to listOf('B', 'C', 'M', 'P'),
|
36
|
+
4 to listOf('F', 'H', 'V', 'W', 'Y'),
|
37
|
+
5 to listOf('K'),
|
38
|
+
8 to listOf('J', 'X'),
|
39
|
+
10 to listOf('Q', 'Z')
|
40
40
|
)
|
41
41
|
val expected = mapOf(
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
'a' to 1, 'b' to 3, 'c' to 3, 'd' to 2, 'e' to 1,
|
43
|
+
'f' to 4, 'g' to 2, 'h' to 4, 'i' to 1, 'j' to 8,
|
44
|
+
'k' to 5, 'l' to 1, 'm' to 3, 'n' to 1, 'o' to 1,
|
45
|
+
'p' to 3, 'q' to 10, 'r' to 1, 's' to 1, 't' to 1,
|
46
|
+
'u' to 1, 'v' to 4, 'w' to 4, 'x' to 8, 'y' to 4,
|
47
|
+
'z' to 10
|
48
48
|
)
|
49
49
|
|
50
50
|
assertEquals(expected, ETL.transform(old))
|
@@ -43,6 +43,11 @@ class PangramTest {
|
|
43
43
|
fun mixedCaseAndPunctuation() {
|
44
44
|
assertTrue(Pangrams.isPangram("\"Five quacking Zephyrs jolt my wax bed.\""))
|
45
45
|
}
|
46
|
+
|
47
|
+
@Test
|
48
|
+
fun mixedCaseDuplicatedCharacters() {
|
49
|
+
assertFalse(Pangrams.isPangram("the quick brown fox jumps over the lazy FOX"))
|
50
|
+
}
|
46
51
|
|
47
52
|
@Test
|
48
53
|
fun nonAsciiCharacters() {
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Common Lisp is an offshoot of the long-running family of Lisp programming languages.
|
2
|
+
It's a multi-paradigm programming language that allows you to choose the approach and paradigm
|
3
|
+
according to your application domain.
|
4
|
+
|
5
|
+
Common Lisp has fast prototyping capabilities, and exceptional support for object oriented programming.
|
6
|
+
It also boasts a macro system which allows you to adapt the language to your needs,
|
7
|
+
and a run-time environment which allows modification of running applications.
|
8
|
+
|
9
|
+
To learn more about Common Lisp, take a look at [the Common Lisp homepage](https://common-lisp.net/).
|
@@ -17,6 +17,22 @@ describe('transpose', function()
|
|
17
17
|
assert.are.equal('S\ni\nn\ng\nl\ne\n \nl\ni\nn\ne\n.', transpose('Single line.'))
|
18
18
|
end)
|
19
19
|
|
20
|
+
it('should transpose a string with empty lines', function()
|
21
|
+
local input =
|
22
|
+
'\n' ..
|
23
|
+
'Line 2\n' ..
|
24
|
+
'\n' ..
|
25
|
+
'L4'
|
26
|
+
local expected =
|
27
|
+
' L L\n' ..
|
28
|
+
' i 4\n' ..
|
29
|
+
' n\n' ..
|
30
|
+
' e\n' ..
|
31
|
+
' \n' ..
|
32
|
+
' 2'
|
33
|
+
assert.are.equal(expected, transpose(input))
|
34
|
+
end)
|
35
|
+
|
20
36
|
it('should transpose a string with the first line longer than the second', function()
|
21
37
|
local input =
|
22
38
|
'The fourth line.\n' ..
|