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
@@ -9,13 +9,13 @@ module BankAccount
|
|
9
9
|
data BankAccount = Dummy
|
10
10
|
|
11
11
|
closeAccount :: BankAccount -> IO ()
|
12
|
-
closeAccount =
|
12
|
+
closeAccount = error "You need to implement this function."
|
13
13
|
|
14
14
|
getBalance :: BankAccount -> IO (Maybe Integer)
|
15
|
-
getBalance =
|
15
|
+
getBalance = error "You need to implement this function."
|
16
16
|
|
17
17
|
incrementBalance :: BankAccount -> Integer -> IO (Maybe Integer)
|
18
|
-
incrementBalance =
|
18
|
+
incrementBalance = error "You need to implement this function."
|
19
19
|
|
20
20
|
openAccount :: IO BankAccount
|
21
|
-
openAccount =
|
21
|
+
openAccount = error "You need to implement this function."
|
@@ -13,25 +13,25 @@ module BST
|
|
13
13
|
data BST a = Dummy deriving (Eq, Show)
|
14
14
|
|
15
15
|
bstLeft :: BST a -> Maybe (BST a)
|
16
|
-
bstLeft =
|
16
|
+
bstLeft = error "You need to implement this function."
|
17
17
|
|
18
18
|
bstRight :: BST a -> Maybe (BST a)
|
19
|
-
bstRight =
|
19
|
+
bstRight = error "You need to implement this function."
|
20
20
|
|
21
21
|
bstValue :: BST a -> Maybe a
|
22
|
-
bstValue =
|
22
|
+
bstValue = error "You need to implement this function."
|
23
23
|
|
24
24
|
empty :: BST a
|
25
|
-
empty =
|
25
|
+
empty = error "You need to implement this function."
|
26
26
|
|
27
27
|
fromList :: Ord a => [a] -> BST a
|
28
|
-
fromList =
|
28
|
+
fromList = error "You need to implement this function."
|
29
29
|
|
30
30
|
insert :: Ord a => a -> BST a -> BST a
|
31
|
-
insert =
|
31
|
+
insert = error "You need to implement this function."
|
32
32
|
|
33
33
|
singleton :: a -> BST a
|
34
|
-
singleton =
|
34
|
+
singleton = error "You need to implement this function."
|
35
35
|
|
36
36
|
toList :: BST a -> [a]
|
37
|
-
toList =
|
37
|
+
toList = error "You need to implement this function."
|
@@ -3,13 +3,13 @@ module Clock (clockHour, clockMin, fromHourMin, toString) where
|
|
3
3
|
data Clock = Dummy
|
4
4
|
|
5
5
|
clockHour :: Clock -> Int
|
6
|
-
clockHour =
|
6
|
+
clockHour = error "You need to implement this function."
|
7
7
|
|
8
8
|
clockMin :: Clock -> Int
|
9
|
-
clockMin =
|
9
|
+
clockMin = error "You need to implement this function."
|
10
10
|
|
11
11
|
fromHourMin :: Int -> Int -> Clock
|
12
|
-
fromHourMin =
|
12
|
+
fromHourMin = error "You need to implement this function."
|
13
13
|
|
14
14
|
toString :: Clock -> String
|
15
|
-
toString =
|
15
|
+
toString = error "You need to implement this function."
|
@@ -19,40 +19,40 @@ import Prelude hiding (null)
|
|
19
19
|
data CustomSet a = Dummy deriving (Eq, Show)
|
20
20
|
|
21
21
|
delete :: a -> CustomSet a -> CustomSet a
|
22
|
-
delete =
|
22
|
+
delete = error "You need to implement this function."
|
23
23
|
|
24
24
|
difference :: CustomSet a -> CustomSet a -> CustomSet a
|
25
|
-
difference =
|
25
|
+
difference = error "You need to implement this function."
|
26
26
|
|
27
27
|
empty :: CustomSet a
|
28
|
-
empty =
|
28
|
+
empty = error "You need to implement this function."
|
29
29
|
|
30
30
|
fromList :: [a] -> CustomSet a
|
31
|
-
fromList =
|
31
|
+
fromList = error "You need to implement this function."
|
32
32
|
|
33
33
|
insert :: a -> CustomSet a -> CustomSet a
|
34
|
-
insert =
|
34
|
+
insert = error "You need to implement this function."
|
35
35
|
|
36
36
|
intersection :: CustomSet a -> CustomSet a -> CustomSet a
|
37
|
-
intersection =
|
37
|
+
intersection = error "You need to implement this function."
|
38
38
|
|
39
39
|
isDisjointFrom :: CustomSet a -> CustomSet a -> Bool
|
40
|
-
isDisjointFrom =
|
40
|
+
isDisjointFrom = error "You need to implement this function."
|
41
41
|
|
42
42
|
isSubsetOf :: CustomSet a -> CustomSet a -> Bool
|
43
|
-
isSubsetOf =
|
43
|
+
isSubsetOf = error "You need to implement this function."
|
44
44
|
|
45
45
|
member :: a -> CustomSet a -> Bool
|
46
|
-
member =
|
46
|
+
member = error "You need to implement this function."
|
47
47
|
|
48
48
|
null :: CustomSet a -> Bool
|
49
|
-
null =
|
49
|
+
null = error "You need to implement this function."
|
50
50
|
|
51
51
|
size :: CustomSet a -> Int
|
52
|
-
size =
|
52
|
+
size = error "You need to implement this function."
|
53
53
|
|
54
54
|
toList :: CustomSet a -> [a]
|
55
|
-
toList =
|
55
|
+
toList = error "You need to implement this function."
|
56
56
|
|
57
57
|
union :: CustomSet a -> CustomSet a -> CustomSet a
|
58
|
-
union =
|
58
|
+
union = error "You need to implement this function."
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module Squares (difference, squareOfSums, sumOfSquares) where
|
2
2
|
|
3
3
|
difference :: Integral a => a -> a
|
4
|
-
difference =
|
4
|
+
difference = error "You need to implement this function."
|
5
5
|
|
6
6
|
squareOfSums :: Integral a => a -> a
|
7
|
-
squareOfSums =
|
7
|
+
squareOfSums = error "You need to implement this function."
|
8
8
|
|
9
9
|
sumOfSquares :: Integral a => a -> a
|
10
|
-
sumOfSquares =
|
10
|
+
sumOfSquares = error "You need to implement this function."
|
@@ -20,10 +20,10 @@ data ForthError
|
|
20
20
|
data ForthState = Dummy
|
21
21
|
|
22
22
|
empty :: ForthState
|
23
|
-
empty =
|
23
|
+
empty = error "You need to implement this function."
|
24
24
|
|
25
25
|
evalText :: Text -> ForthState -> Either ForthError ForthState
|
26
|
-
evalText =
|
26
|
+
evalText = error "You need to implement this function."
|
27
27
|
|
28
28
|
toList :: ForthState -> [Int]
|
29
|
-
toList =
|
29
|
+
toList = error "You need to implement this function."
|
@@ -10,7 +10,7 @@ data Color = Black | White deriving (Eq, Ord, Show)
|
|
10
10
|
type Coord = (Int, Int)
|
11
11
|
|
12
12
|
territories :: [String] -> [(Set Coord, Maybe Color)]
|
13
|
-
territories =
|
13
|
+
territories = error "You need to implement this function."
|
14
14
|
|
15
15
|
territoryFor :: [String] -> Coord -> Maybe (Set Coord, Maybe Color)
|
16
|
-
territoryFor =
|
16
|
+
territoryFor = error "You need to implement this function."
|
@@ -3,13 +3,13 @@ module School (School, add, empty, grade, sorted) where
|
|
3
3
|
data School = Dummy
|
4
4
|
|
5
5
|
add :: Int -> String -> School -> School
|
6
|
-
add gradeNum student school =
|
6
|
+
add gradeNum student school = error "You need to implement this function."
|
7
7
|
|
8
8
|
empty :: School
|
9
|
-
empty =
|
9
|
+
empty = error "You need to implement this function."
|
10
10
|
|
11
11
|
grade :: Int -> School -> [String]
|
12
|
-
grade gradeNum school =
|
12
|
+
grade gradeNum school = error "You need to implement this function."
|
13
13
|
|
14
14
|
sorted :: School -> [(Int, [String])]
|
15
|
-
sorted school =
|
15
|
+
sorted school = error "You need to implement this function."
|
@@ -14,10 +14,10 @@ data Plant = Clover
|
|
14
14
|
deriving (Eq, Show)
|
15
15
|
|
16
16
|
defaultGarden :: String -> Map String [Plant]
|
17
|
-
defaultGarden =
|
17
|
+
defaultGarden = error "You need to implement this function."
|
18
18
|
|
19
19
|
garden :: [String] -> String -> Map String [Plant]
|
20
|
-
garden =
|
20
|
+
garden = error "You need to implement this function."
|
21
21
|
|
22
22
|
lookupPlants :: String -> Map String [Plant] -> [Plant]
|
23
|
-
lookupPlants =
|
23
|
+
lookupPlants = error "You need to implement this function."
|
@@ -31,13 +31,13 @@ data Address = Address { _street :: String
|
|
31
31
|
}
|
32
32
|
|
33
33
|
bornStreet :: Born -> String
|
34
|
-
bornStreet =
|
34
|
+
bornStreet = error "You need to implement this function."
|
35
35
|
|
36
36
|
setCurrentStreet :: String -> Person -> Person
|
37
|
-
setCurrentStreet =
|
37
|
+
setCurrentStreet = error "You need to implement this function."
|
38
38
|
|
39
39
|
setBirthMonth :: Int -> Person -> Person
|
40
|
-
setBirthMonth =
|
40
|
+
setBirthMonth = error "You need to implement this function."
|
41
41
|
|
42
42
|
renameStreets :: (String -> String) -> Person -> Person
|
43
|
-
renameStreets =
|
43
|
+
renameStreets = error "You need to implement this function."
|
@@ -3,16 +3,16 @@ module Deque (Deque, mkDeque, pop, push, shift, unshift) where
|
|
3
3
|
data Deque a = Dummy
|
4
4
|
|
5
5
|
mkDeque :: IO (Deque a)
|
6
|
-
mkDeque =
|
6
|
+
mkDeque = error "You need to implement this function."
|
7
7
|
|
8
8
|
pop :: Deque a -> IO (Maybe a)
|
9
|
-
pop =
|
9
|
+
pop = error "You need to implement this function."
|
10
10
|
|
11
11
|
push :: Deque a -> a -> IO ()
|
12
|
-
push =
|
12
|
+
push = error "You need to implement this function."
|
13
13
|
|
14
14
|
unshift :: Deque a -> a -> IO ()
|
15
|
-
unshift =
|
15
|
+
unshift = error "You need to implement this function."
|
16
16
|
|
17
17
|
shift :: Deque a -> IO (Maybe a)
|
18
|
-
shift =
|
18
|
+
shift = error "You need to implement this function."
|
@@ -13,25 +13,25 @@ import Prelude hiding
|
|
13
13
|
( length, reverse, map, filter, foldr, (++), concat )
|
14
14
|
|
15
15
|
foldl' :: (b -> a -> b) -> b -> [a] -> b
|
16
|
-
foldl' =
|
16
|
+
foldl' = error "You need to implement this function."
|
17
17
|
|
18
18
|
foldr :: (a -> b -> b) -> b -> [a] -> b
|
19
|
-
foldr =
|
19
|
+
foldr = error "You need to implement this function."
|
20
20
|
|
21
21
|
length :: [a] -> Int
|
22
|
-
length =
|
22
|
+
length = error "You need to implement this function."
|
23
23
|
|
24
24
|
reverse :: [a] -> [a]
|
25
|
-
reverse =
|
25
|
+
reverse = error "You need to implement this function."
|
26
26
|
|
27
27
|
map :: (a -> b) -> [a] -> [b]
|
28
|
-
map =
|
28
|
+
map = error "You need to implement this function."
|
29
29
|
|
30
30
|
filter :: (a -> Bool) -> [a] -> [a]
|
31
|
-
filter =
|
31
|
+
filter = error "You need to implement this function."
|
32
32
|
|
33
33
|
(++) :: [a] -> [a] -> [a]
|
34
|
-
xs ++ ys =
|
34
|
+
xs ++ ys = error "You need to implement this function."
|
35
35
|
|
36
36
|
concat :: [[a]] -> [a]
|
37
|
-
concat =
|
37
|
+
concat = error "You need to implement this function."
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Luhn (addends, checkDigit, checksum, create, isValid) where
|
2
2
|
|
3
|
-
addends =
|
3
|
+
addends = error "You need to implement this function."
|
4
4
|
|
5
|
-
checkDigit =
|
5
|
+
checkDigit = error "You need to implement this function."
|
6
6
|
|
7
|
-
checksum =
|
7
|
+
checksum = error "You need to implement this function."
|
8
8
|
|
9
|
-
create =
|
9
|
+
create = error "You need to implement this function."
|
10
10
|
|
11
|
-
isValid =
|
11
|
+
isValid = error "You need to implement this function."
|
@@ -17,31 +17,31 @@ import Data.Vector (Vector)
|
|
17
17
|
data Matrix a = Dummy deriving (Eq, Show)
|
18
18
|
|
19
19
|
cols :: Matrix a -> Int
|
20
|
-
cols =
|
20
|
+
cols = error "You need to implement this function."
|
21
21
|
|
22
22
|
column :: Int -> Matrix a -> Vector a
|
23
|
-
column =
|
23
|
+
column = error "You need to implement this function."
|
24
24
|
|
25
25
|
flatten :: Matrix a -> Vector a
|
26
|
-
flatten =
|
26
|
+
flatten = error "You need to implement this function."
|
27
27
|
|
28
28
|
fromList :: [[a]] -> Matrix a
|
29
|
-
fromList =
|
29
|
+
fromList = error "You need to implement this function."
|
30
30
|
|
31
31
|
fromString :: Read a => String -> Matrix a
|
32
|
-
fromString =
|
32
|
+
fromString = error "You need to implement this function."
|
33
33
|
|
34
34
|
reshape :: (Int, Int) -> Matrix a -> Matrix a
|
35
|
-
reshape =
|
35
|
+
reshape = error "You need to implement this function."
|
36
36
|
|
37
37
|
row :: Int -> Matrix a -> Vector a
|
38
|
-
row =
|
38
|
+
row = error "You need to implement this function."
|
39
39
|
|
40
40
|
rows :: Matrix a -> Int
|
41
|
-
rows =
|
41
|
+
rows = error "You need to implement this function."
|
42
42
|
|
43
43
|
shape :: Matrix a -> (Int, Int)
|
44
|
-
shape =
|
44
|
+
shape = error "You need to implement this function."
|
45
45
|
|
46
46
|
transpose :: Matrix a -> Matrix a
|
47
|
-
transpose =
|
47
|
+
transpose = error "You need to implement this function."
|
@@ -3,7 +3,7 @@ module DNA (count, nucleotideCounts) where
|
|
3
3
|
import Data.Map (Map)
|
4
4
|
|
5
5
|
count :: Char -> String -> Either String Int
|
6
|
-
count =
|
6
|
+
count = error "You need to implement this function."
|
7
7
|
|
8
8
|
nucleotideCounts :: String -> Either String (Map Char Int)
|
9
|
-
nucleotideCounts =
|
9
|
+
nucleotideCounts = error "You need to implement this function."
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Palindromes (largestPalindrome, smallestPalindrome) where
|
2
2
|
|
3
3
|
largestPalindrome :: Integer -> Integer -> (Integer, [(Integer, Integer)])
|
4
|
-
largestPalindrome minFactor maxFactor =
|
4
|
+
largestPalindrome minFactor maxFactor = error "You need to implement this function."
|
5
5
|
|
6
6
|
smallestPalindrome :: Integer -> Integer -> (Integer, [(Integer, Integer)])
|
7
|
-
smallestPalindrome minFactor maxFactor =
|
7
|
+
smallestPalindrome minFactor maxFactor = error "You need to implement this function."
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module Phone (areaCode, number, prettyPrint) where
|
2
2
|
|
3
3
|
areaCode :: String -> Maybe String
|
4
|
-
areaCode =
|
4
|
+
areaCode = error "You need to implement this function."
|
5
5
|
|
6
6
|
number :: String -> Maybe String
|
7
|
-
number =
|
7
|
+
number = error "You need to implement this function."
|
8
8
|
|
9
9
|
prettyPrint :: String -> Maybe String
|
10
|
-
prettyPrint =
|
10
|
+
prettyPrint = error "You need to implement this function."
|
@@ -3,7 +3,7 @@ module POV (fromPOV, tracePathBetween) where
|
|
3
3
|
import Data.Tree (Tree)
|
4
4
|
|
5
5
|
fromPOV :: Eq a => a -> Tree a -> Maybe (Tree a)
|
6
|
-
fromPOV =
|
6
|
+
fromPOV = error "You need to implement this function."
|
7
7
|
|
8
8
|
tracePathBetween :: Eq a => a -> a -> Tree a -> Maybe [a]
|
9
|
-
tracePathBetween =
|
9
|
+
tracePathBetween = error "You need to implement this function."
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Triplet (isPythagorean, mkTriplet, pythagoreanTriplets) where
|
2
2
|
|
3
|
-
isPythagorean =
|
3
|
+
isPythagorean = error "You need to implement this function."
|
4
4
|
|
5
|
-
mkTriplet =
|
5
|
+
mkTriplet = error "You need to implement this function."
|
6
6
|
|
7
|
-
pythagoreanTriplets =
|
7
|
+
pythagoreanTriplets = error "You need to implement this function."
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Queens (boardString, canAttack) where
|
2
2
|
|
3
3
|
boardString :: Maybe (Int, Int) -> Maybe (Int, Int) -> String
|
4
|
-
boardString white black =
|
4
|
+
boardString white black = error "You need to implement this function."
|
5
5
|
|
6
6
|
canAttack :: (Int, Int) -> (Int, Int) -> Bool
|
7
|
-
canAttack =
|
7
|
+
canAttack = error "You need to implement this function."
|
@@ -3,10 +3,10 @@ module Robot (Robot, mkRobot, resetName, robotName) where
|
|
3
3
|
data Robot = Dummy
|
4
4
|
|
5
5
|
mkRobot :: IO Robot
|
6
|
-
mkRobot =
|
6
|
+
mkRobot = error "You need to implement this function."
|
7
7
|
|
8
8
|
resetName :: Robot -> IO ()
|
9
|
-
resetName =
|
9
|
+
resetName = error "You need to implement this function."
|
10
10
|
|
11
11
|
robotName :: Robot -> IO String
|
12
|
-
robotName =
|
12
|
+
robotName = error "You need to implement this function."
|
@@ -17,19 +17,19 @@ data Bearing = North
|
|
17
17
|
data Robot = Dummy
|
18
18
|
|
19
19
|
bearing :: Robot -> Bearing
|
20
|
-
bearing =
|
20
|
+
bearing = error "You need to implement this function."
|
21
21
|
|
22
22
|
coordinates :: Robot -> (Integer, Integer)
|
23
|
-
coordinates =
|
23
|
+
coordinates = error "You need to implement this function."
|
24
24
|
|
25
25
|
mkRobot :: Bearing -> (Integer, Integer) -> Robot
|
26
|
-
mkRobot =
|
26
|
+
mkRobot = error "You need to implement this function."
|
27
27
|
|
28
28
|
simulate :: Robot -> String -> Robot
|
29
|
-
simulate =
|
29
|
+
simulate = error "You need to implement this function."
|
30
30
|
|
31
31
|
turnLeft :: Bearing -> Bearing
|
32
|
-
turnLeft =
|
32
|
+
turnLeft = error "You need to implement this function."
|
33
33
|
|
34
34
|
turnRight :: Bearing -> Bearing
|
35
|
-
turnRight =
|
35
|
+
turnRight = error "You need to implement this function."
|