trackler 2.2.1.113 → 2.2.1.114

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/tracks/bash/exercises/hello-world/hello_world.sh +1 -1
  4. data/tracks/c/config.json +24 -0
  5. data/tracks/c/exercises/two-fer/README.md +12 -0
  6. data/tracks/c/exercises/two-fer/makefile +25 -0
  7. data/tracks/c/exercises/two-fer/src/example.c +11 -0
  8. data/tracks/c/exercises/two-fer/src/example.h +6 -0
  9. data/tracks/c/exercises/two-fer/test/test_two_fer.c +51 -0
  10. data/tracks/c/exercises/two-fer/test/vendor/unity.c +1300 -0
  11. data/tracks/c/exercises/two-fer/test/vendor/unity.h +274 -0
  12. data/tracks/c/exercises/two-fer/test/vendor/unity_internals.h +701 -0
  13. data/tracks/c/exercises/wordy/README.md +51 -0
  14. data/tracks/c/exercises/wordy/makefile +25 -0
  15. data/tracks/c/exercises/wordy/src/example.c +53 -0
  16. data/tracks/c/exercises/wordy/src/example.h +7 -0
  17. data/tracks/c/exercises/wordy/test/test_wordy.c +206 -0
  18. data/tracks/c/exercises/wordy/test/vendor/unity.c +1300 -0
  19. data/tracks/c/exercises/wordy/test/vendor/unity.h +274 -0
  20. data/tracks/c/exercises/wordy/test/vendor/unity_internals.h +701 -0
  21. data/tracks/dart/.gitignore +6 -7
  22. data/tracks/dart/bin/create_exercise.dart +17 -17
  23. data/tracks/dart/exercises/anagram/lib/anagram.dart +1 -1
  24. data/tracks/dart/exercises/anagram/test/anagram_test.dart +27 -31
  25. data/tracks/dart/exercises/bob/lib/example.dart +7 -1
  26. data/tracks/dart/exercises/bob/test/bob_test.dart +81 -43
  27. data/tracks/dart/exercises/difference-of-squares/lib/example.dart +3 -3
  28. data/tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart +26 -17
  29. data/tracks/dart/pubspec.lock +28 -16
  30. data/tracks/dart/pubspec.yaml +2 -2
  31. data/tracks/elixir/.travis.yml +3 -3
  32. data/tracks/elixir/README.md +1 -1
  33. data/tracks/elixir/config.json +12 -0
  34. data/tracks/elixir/exercises/alphametics/README.md +73 -0
  35. data/tracks/elixir/exercises/alphametics/alphametics.exs +21 -0
  36. data/tracks/elixir/exercises/alphametics/alphametics_test.exs +162 -0
  37. data/tracks/elixir/exercises/alphametics/example.exs +70 -0
  38. data/tracks/elixir/mix.exs +1 -1
  39. data/tracks/elixir/mix.lock +0 -1
  40. data/tracks/elm/config.json +9 -0
  41. data/tracks/elm/exercises/accumulate/Accumulate.elm +6 -1
  42. data/tracks/elm/exercises/accumulate/Accumulate.example.elm +1 -1
  43. data/tracks/elm/exercises/acronym/Acronym.elm +6 -1
  44. data/tracks/elm/exercises/acronym/Acronym.example.elm +1 -1
  45. data/tracks/elm/exercises/all-your-base/AllYourBase.elm +6 -1
  46. data/tracks/elm/exercises/all-your-base/AllYourBase.example.elm +1 -1
  47. data/tracks/elm/exercises/allergies/Allergies.elm +11 -1
  48. data/tracks/elm/exercises/allergies/Allergies.example.elm +1 -1
  49. data/tracks/elm/exercises/anagram/Anagram.elm +6 -1
  50. data/tracks/elm/exercises/anagram/Anagram.example.elm +1 -1
  51. data/tracks/elm/exercises/atbash-cipher/AtbashCipher.elm +11 -1
  52. data/tracks/elm/exercises/atbash-cipher/AtbashCipher.example.elm +1 -1
  53. data/tracks/elm/exercises/binary-search/BinarySearch.elm +1 -2
  54. data/tracks/elm/exercises/bob/Bob.elm +6 -1
  55. data/tracks/elm/exercises/bob/Bob.example.elm +1 -1
  56. data/tracks/elm/exercises/collatz-conjecture/CollatzConjecture.elm +5 -1
  57. data/tracks/elm/exercises/difference-of-squares/DifferenceOfSquares.elm +16 -1
  58. data/tracks/elm/exercises/difference-of-squares/DifferenceOfSquares.example.elm +1 -1
  59. data/tracks/elm/exercises/etl/Etl.elm +5 -0
  60. data/tracks/elm/exercises/gigasecond/Gigasecond.elm +5 -0
  61. data/tracks/elm/exercises/grade-school/GradeSchool.elm +32 -1
  62. data/tracks/elm/exercises/grade-school/GradeSchool.example.elm +1 -1
  63. data/tracks/elm/exercises/grains/Grains.elm +5 -1
  64. data/tracks/elm/exercises/grains/Grains.example.elm +1 -1
  65. data/tracks/elm/exercises/hamming/Hamming.elm +6 -1
  66. data/tracks/elm/exercises/hello-world/HelloWorld.elm +2 -2
  67. data/tracks/elm/exercises/hello-world/HelloWorld.example.elm +1 -1
  68. data/tracks/elm/exercises/isogram/Isogram.elm +6 -1
  69. data/tracks/elm/exercises/largest-series-product/LargestSeriesProduct.elm +5 -0
  70. data/tracks/elm/exercises/leap/Leap.elm +6 -1
  71. data/tracks/elm/exercises/leap/Leap.example.elm +1 -1
  72. data/tracks/elm/exercises/list-ops/ListOps.elm +51 -1
  73. data/tracks/elm/exercises/list-ops/ListOps.example.elm +11 -1
  74. data/tracks/elm/exercises/list-ops/tests/Tests.elm +1 -1
  75. data/tracks/elm/exercises/luhn/Luhn.elm +6 -1
  76. data/tracks/elm/exercises/nucleotide-count/NucleotideCount.elm +14 -1
  77. data/tracks/elm/exercises/nucleotide-count/NucleotideCount.example.elm +1 -1
  78. data/tracks/elm/exercises/pangram/Pangram.elm +6 -1
  79. data/tracks/elm/exercises/pangram/Pangram.example.elm +1 -1
  80. data/tracks/elm/exercises/pascals-triangle/Triangle.elm +6 -1
  81. data/tracks/elm/exercises/phone-number/PhoneNumber.elm +11 -1
  82. data/tracks/elm/exercises/phone-number/PhoneNumber.example.elm +1 -1
  83. data/tracks/elm/exercises/raindrops/Raindrops.elm +6 -1
  84. data/tracks/elm/exercises/raindrops/Raindrops.example.elm +1 -1
  85. data/tracks/elm/exercises/rna-transcription/RNATranscription.elm +6 -1
  86. data/tracks/elm/exercises/robot-simulator/RobotSimulator.elm +48 -1
  87. data/tracks/elm/exercises/robot-simulator/RobotSimulator.example.elm +10 -1
  88. data/tracks/elm/exercises/roman-numerals/RomanNumerals.elm +5 -0
  89. data/tracks/elm/exercises/run-length-encoding/RunLengthEncoding.elm +11 -2
  90. data/tracks/elm/exercises/say/Say.elm +11 -1
  91. data/tracks/elm/exercises/scrabble-score/ScrabbleScore.elm +6 -1
  92. data/tracks/elm/exercises/scrabble-score/ScrabbleScore.example.elm +1 -1
  93. data/tracks/elm/exercises/series/Series.elm +6 -1
  94. data/tracks/elm/exercises/series/Series.example.elm +1 -1
  95. data/tracks/elm/exercises/space-age/SpaceAge.elm +6 -1
  96. data/tracks/elm/exercises/space-age/SpaceAge.example.elm +1 -1
  97. data/tracks/elm/exercises/strain/Strain.elm +11 -1
  98. data/tracks/elm/exercises/strain/Strain.example.elm +1 -1
  99. data/tracks/elm/exercises/sublist/Sublist.elm +13 -1
  100. data/tracks/elm/exercises/sublist/Sublist.example.elm +1 -1
  101. data/tracks/elm/exercises/sum-of-multiples/SumOfMultiples.elm +6 -1
  102. data/tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm +1 -1
  103. data/tracks/elm/exercises/transpose/README.md +95 -0
  104. data/tracks/elm/exercises/transpose/Transpose.elm +6 -0
  105. data/tracks/elm/exercises/transpose/Transpose.example.elm +47 -0
  106. data/tracks/elm/exercises/transpose/elm-package.json +15 -0
  107. data/tracks/elm/exercises/transpose/tests/Tests.elm +202 -0
  108. data/tracks/elm/exercises/transpose/tests/elm-package.json +16 -0
  109. data/tracks/elm/exercises/triangle/Triangle.elm +12 -1
  110. data/tracks/elm/exercises/triangle/Triangle.example.elm +1 -1
  111. data/tracks/elm/exercises/twelve-days/TwelveDays.elm +6 -1
  112. data/tracks/elm/exercises/word-count/WordCount.elm +3 -1
  113. data/tracks/elm/exercises/word-count/WordCount.example.elm +1 -1
  114. data/tracks/go/exercises/crypto-square/crypto_square_test.go +9 -9
  115. data/tracks/go/exercises/crypto-square/example.go +7 -0
  116. data/tracks/idris/docs/INSTALLATION.md +4 -4
  117. data/tracks/java/config.json +13 -0
  118. data/tracks/java/exercises/alphametics/.meta/version +1 -0
  119. data/tracks/java/exercises/go-counting/.meta/src/reference/java/GoCounting.java +152 -0
  120. data/tracks/java/exercises/go-counting/.meta/src/reference/java/Player.java +3 -0
  121. data/tracks/java/exercises/go-counting/.meta/version +2 -0
  122. data/tracks/java/exercises/go-counting/README.md +50 -0
  123. data/tracks/java/exercises/go-counting/build.gradle +18 -0
  124. data/tracks/java/exercises/go-counting/src/main/java/.keep +0 -0
  125. data/tracks/java/exercises/go-counting/src/main/java/Player.java +3 -0
  126. data/tracks/java/exercises/go-counting/src/test/java/GoCountingTest.java +178 -0
  127. data/tracks/java/exercises/isogram/.meta/version +1 -1
  128. data/tracks/java/exercises/perfect-numbers/.meta/version +1 -1
  129. data/tracks/java/exercises/settings.gradle +1 -0
  130. data/tracks/javascript/.eslintignore +0 -1
  131. data/tracks/javascript/exercises/minesweeper/example.js +15 -15
  132. data/tracks/javascript/package-lock.json +7 -14
  133. data/tracks/javascript/package.json +1 -1
  134. data/tracks/perl6/exercises/grains/.meta/exercise-data.yaml +2 -2
  135. data/tracks/perl6/exercises/grains/grains.t +34 -13
  136. data/tracks/r/config.json +13 -0
  137. data/tracks/r/exercises/bob/README.md +2 -0
  138. data/tracks/r/exercises/bob/example.R +5 -0
  139. data/tracks/r/exercises/bob/test_bob.R +1 -1
  140. data/tracks/r/exercises/crypto-square/README.md +84 -0
  141. data/tracks/r/exercises/crypto-square/crypto-square.R +15 -0
  142. data/tracks/r/exercises/crypto-square/example.R +47 -0
  143. data/tracks/r/exercises/crypto-square/test_crypto-square.R +65 -0
  144. data/tracks/rust/exercises/allergies/tests/allergies.rs +36 -36
  145. data/tracks/rust/exercises/book-store/Cargo-example.toml +1 -2
  146. data/tracks/rust/exercises/book-store/Cargo.toml +1 -1
  147. data/tracks/rust/exercises/book-store/example.rs +10 -14
  148. data/tracks/rust/exercises/book-store/src/lib.rs +1 -1
  149. data/tracks/rust/exercises/book-store/tests/book-store.rs +15 -15
  150. data/tracks/rust/exercises/dominoes/example.rs +3 -3
  151. data/tracks/rust/exercises/dominoes/tests/dominoes.rs +26 -26
  152. data/tracks/rust/exercises/grade-school/tests/grade-school.rs +5 -5
  153. data/tracks/rust/exercises/poker/tests/poker.rs +55 -55
  154. data/tracks/rust/exercises/react/tests/react.rs +28 -28
  155. data/tracks/rust/exercises/rectangles/example.rs +1 -1
  156. data/tracks/rust/exercises/rectangles/tests/rectangles.rs +26 -26
  157. data/tracks/rust/exercises/simple-linked-list/tests/simple-linked-list.rs +1 -1
  158. data/tracks/rust/exercises/sum-of-multiples/tests/sum-of-multiples.rs +12 -12
  159. data/tracks/rust/exercises/variable-length-quantity/example.rs +9 -3
  160. data/tracks/rust/exercises/variable-length-quantity/src/lib.rs +7 -1
  161. data/tracks/rust/exercises/variable-length-quantity/tests/variable-length-quantity.rs +3 -3
  162. data/tracks/rust/exercises/word-count/tests/word-count.rs +20 -20
  163. data/tracks/scala/exercises/secret-handshake/src/test/scala/SecretHandshakeTest.scala +2 -2
  164. data/tracks/scala/exercises/sieve/src/test/scala/SieveTest.scala +12 -12
  165. data/tracks/scala/testgen/src/main/scala/SecretHandshakeTestGenerator.scala +2 -2
  166. data/tracks/scala/testgen/src/main/scala/SieveTestGenerator.scala +2 -2
  167. data/tracks/typescript/config.json +68 -0
  168. data/tracks/typescript/exercises/armstrong-numbers/README.md +44 -0
  169. data/tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.example.ts +11 -0
  170. data/tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.test.ts +35 -0
  171. data/tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.ts +0 -0
  172. data/tracks/typescript/exercises/armstrong-numbers/package.json +36 -0
  173. data/tracks/typescript/exercises/armstrong-numbers/tsconfig.json +22 -0
  174. data/tracks/typescript/exercises/armstrong-numbers/tslint.json +127 -0
  175. data/tracks/typescript/exercises/armstrong-numbers/yarn.lock +2624 -0
  176. data/tracks/typescript/exercises/perfect-numbers/README.md +50 -0
  177. data/tracks/typescript/exercises/perfect-numbers/package.json +36 -0
  178. data/tracks/typescript/exercises/perfect-numbers/perfect-numbers.example.ts +55 -0
  179. data/tracks/typescript/exercises/perfect-numbers/perfect-numbers.test.ts +72 -0
  180. data/tracks/typescript/exercises/perfect-numbers/perfect-numbers.ts +0 -0
  181. data/tracks/typescript/exercises/perfect-numbers/tsconfig.json +22 -0
  182. data/tracks/typescript/exercises/perfect-numbers/tslint.json +127 -0
  183. data/tracks/typescript/exercises/perfect-numbers/yarn.lock +2624 -0
  184. data/tracks/typescript/exercises/rational-numbers/README.md +61 -0
  185. data/tracks/typescript/exercises/rational-numbers/package.json +36 -0
  186. data/tracks/typescript/exercises/rational-numbers/rational-numbers.example.ts +76 -0
  187. data/tracks/typescript/exercises/rational-numbers/rational-numbers.test.ts +197 -0
  188. data/tracks/typescript/exercises/rational-numbers/rational-numbers.ts +0 -0
  189. data/tracks/typescript/exercises/rational-numbers/tsconfig.json +22 -0
  190. data/tracks/typescript/exercises/rational-numbers/tslint.json +127 -0
  191. data/tracks/typescript/exercises/rational-numbers/yarn.lock +2624 -0
  192. data/tracks/typescript/exercises/run-length-encoding/README.md +56 -0
  193. data/tracks/typescript/exercises/run-length-encoding/package.json +36 -0
  194. data/tracks/typescript/exercises/run-length-encoding/run-length-encoding.example.ts +15 -0
  195. data/tracks/typescript/exercises/run-length-encoding/run-length-encoding.test.ts +71 -0
  196. data/tracks/typescript/exercises/run-length-encoding/run-length-encoding.ts +0 -0
  197. data/tracks/typescript/exercises/run-length-encoding/tsconfig.json +22 -0
  198. data/tracks/typescript/exercises/run-length-encoding/tslint.json +127 -0
  199. data/tracks/typescript/exercises/run-length-encoding/yarn.lock +2624 -0
  200. data/tracks/typescript/exercises/secret-handshake/README.md +61 -0
  201. data/tracks/typescript/exercises/secret-handshake/package.json +36 -0
  202. data/tracks/typescript/exercises/secret-handshake/secret-handshake.example.ts +43 -0
  203. data/tracks/typescript/exercises/secret-handshake/secret-handshake.test.ts +69 -0
  204. data/tracks/typescript/exercises/secret-handshake/secret-handshake.ts +0 -0
  205. data/tracks/typescript/exercises/secret-handshake/tsconfig.json +22 -0
  206. data/tracks/typescript/exercises/secret-handshake/tslint.json +127 -0
  207. data/tracks/typescript/exercises/secret-handshake/yarn.lock +2624 -0
  208. metadata +81 -7
  209. data/tracks/dart/exercises/anagram/pubspec.lock +0 -293
  210. data/tracks/dart/exercises/bob/pubspec.lock +0 -293
  211. data/tracks/dart/exercises/difference-of-squares/pubspec.lock +0 -293
  212. data/tracks/java/exercises/alphametics/.meta/src/version +0 -1
  213. data/tracks/r/exercises/bob/.meta/description.md +0 -10
@@ -1,4 +1,14 @@
1
- module ListOps exposing (..)
1
+ module ListOps
2
+ exposing
3
+ ( append
4
+ , concat
5
+ , filter
6
+ , foldl
7
+ , foldr
8
+ , length
9
+ , map
10
+ , reverse
11
+ )
2
12
 
3
13
 
4
14
  length : List a -> Int
@@ -1,7 +1,7 @@
1
1
  module Tests exposing (..)
2
2
 
3
3
  import Expect
4
- import ListOps exposing (..)
4
+ import ListOps exposing (append, concat, filter, foldl, foldr, length, map, reverse)
5
5
  import Test exposing (..)
6
6
 
7
7
 
@@ -1 +1,6 @@
1
- module Luhn exposing (..)
1
+ module Luhn exposing (valid)
2
+
3
+
4
+ valid : String -> Bool
5
+ valid input =
6
+ Debug.crash "Please implement this function"
@@ -1,6 +1,19 @@
1
- module NucleotideCount exposing (..)
1
+ module NucleotideCount exposing (nucleotideCounts, version)
2
2
 
3
3
 
4
4
  version : Int
5
5
  version =
6
6
  2
7
+
8
+
9
+ type alias NucleotideCounts =
10
+ { a : Int
11
+ , t : Int
12
+ , c : Int
13
+ , g : Int
14
+ }
15
+
16
+
17
+ nucleotideCounts : String -> NucleotideCounts
18
+ nucleotideCounts sequence =
19
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module NucleotideCount exposing (..)
1
+ module NucleotideCount exposing (nucleotideCounts, version)
2
2
 
3
3
  import String
4
4
 
@@ -1 +1,6 @@
1
- module Pangram exposing (..)
1
+ module Pangram exposing (isPangram)
2
+
3
+
4
+ isPangram : String -> Bool
5
+ isPangram sentence =
6
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module Pangram exposing (..)
1
+ module Pangram exposing (isPangram)
2
2
 
3
3
  import String exposing (contains, fromChar, toLower)
4
4
 
@@ -1 +1,6 @@
1
- module Triangle exposing (..)
1
+ module Triangle exposing (rows)
2
+
3
+
4
+ rows : Int -> List (List Int)
5
+ rows n =
6
+ Debug.crash "Please implement this function"
@@ -1 +1,11 @@
1
- module PhoneNumber exposing (..)
1
+ module PhoneNumber exposing (getNumber, prettyPrint)
2
+
3
+
4
+ getNumber : String -> Maybe String
5
+ getNumber phoneNumber =
6
+ Debug.crash "Please implement this function"
7
+
8
+
9
+ prettyPrint : String -> Maybe String
10
+ prettyPrint input =
11
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module PhoneNumber exposing (..)
1
+ module PhoneNumber exposing (getNumber, prettyPrint)
2
2
 
3
3
  import List exposing (head, map)
4
4
  import Maybe exposing (andThen)
@@ -1 +1,6 @@
1
- module Raindrops exposing (..)
1
+ module Raindrops exposing (raindrops)
2
+
3
+
4
+ raindrops : Int -> String
5
+ raindrops number =
6
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module Raindrops exposing (..)
1
+ module Raindrops exposing (raindrops)
2
2
 
3
3
  import String
4
4
 
@@ -1 +1,6 @@
1
- module RNATranscription exposing (..)
1
+ module RNATranscription exposing (toRNA)
2
+
3
+
4
+ toRNA : String -> Result Char String
5
+ toRNA dna =
6
+ Debug.crash "Please implement this function"
@@ -1 +1,48 @@
1
- module RobotSimulator exposing (..)
1
+ module RobotSimulator
2
+ exposing
3
+ ( Bearing(..)
4
+ , Robot
5
+ , advance
6
+ , defaultRobot
7
+ , simulate
8
+ , turnLeft
9
+ , turnRight
10
+ )
11
+
12
+
13
+ type Bearing
14
+ = North
15
+ | East
16
+ | South
17
+ | West
18
+
19
+
20
+ type alias Robot =
21
+ { bearing : Bearing
22
+ , coordinates : { x : Int, y : Int }
23
+ }
24
+
25
+
26
+ defaultRobot : Robot
27
+ defaultRobot =
28
+ Debug.crash "Please implement this function"
29
+
30
+
31
+ turnRight : Robot -> Robot
32
+ turnRight robot =
33
+ Debug.crash "Please implement this function"
34
+
35
+
36
+ turnLeft : Robot -> Robot
37
+ turnLeft robot =
38
+ Debug.crash "Please implement this function"
39
+
40
+
41
+ advance : Robot -> Robot
42
+ advance robot =
43
+ Debug.crash "Please implement this function"
44
+
45
+
46
+ simulate : String -> Robot -> Robot
47
+ simulate directions robot =
48
+ Debug.crash "Please implement this function"
@@ -1,4 +1,13 @@
1
- module RobotSimulator exposing (..)
1
+ module RobotSimulator
2
+ exposing
3
+ ( Bearing(East, North, South, West)
4
+ , Robot
5
+ , advance
6
+ , defaultRobot
7
+ , simulate
8
+ , turnLeft
9
+ , turnRight
10
+ )
2
11
 
3
12
  import String
4
13
 
@@ -1 +1,6 @@
1
1
  module RomanNumerals exposing (toRoman)
2
+
3
+
4
+ toRoman : Int -> String
5
+ toRoman number =
6
+ Debug.crash "Please implement this function"
@@ -1,6 +1,15 @@
1
- module RunLengthEncoding exposing (..)
1
+ module RunLengthEncoding exposing (decode, encode, version)
2
2
 
3
3
 
4
- version : Int
5
4
  version =
6
5
  2
6
+
7
+
8
+ encode : String -> String
9
+ encode string =
10
+ Debug.crash "Please implement this function"
11
+
12
+
13
+ decode : String -> String
14
+ decode string =
15
+ Debug.crash "Please implement this function"
@@ -1 +1,11 @@
1
- module Say exposing (say, SayError(..))
1
+ module Say exposing (SayError(..), say)
2
+
3
+
4
+ type SayError
5
+ = Negative
6
+ | TooLarge
7
+
8
+
9
+ say : Int -> Result SayError String
10
+ say number =
11
+ Debug.crash "Please implement this function"
@@ -1 +1,6 @@
1
- module ScrabbleScore exposing (..)
1
+ module ScrabbleScore exposing (scoreWord)
2
+
3
+
4
+ scoreWord : String -> Int
5
+ scoreWord x =
6
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module ScrabbleScore exposing (..)
1
+ module ScrabbleScore exposing (scoreWord)
2
2
 
3
3
  import String exposing (contains, foldl, fromChar, toUpper)
4
4
 
@@ -1 +1,6 @@
1
- module Series exposing (..)
1
+ module Series exposing (slices)
2
+
3
+
4
+ slices : Int -> String -> Result String (List (List Int))
5
+ slices size input =
6
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module Series exposing (..)
1
+ module Series exposing (slices)
2
2
 
3
3
  import List
4
4
  import Result
@@ -1,4 +1,4 @@
1
- module SpaceAge exposing (..)
1
+ module SpaceAge exposing (Planet(..), ageOn)
2
2
 
3
3
 
4
4
  type Planet
@@ -10,3 +10,8 @@ type Planet
10
10
  | Saturn
11
11
  | Uranus
12
12
  | Neptune
13
+
14
+
15
+ ageOn : Planet -> Float -> Float
16
+ ageOn planet seconds =
17
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module SpaceAge exposing (..)
1
+ module SpaceAge exposing (Planet(..), ageOn)
2
2
 
3
3
 
4
4
  type Planet
@@ -1 +1,11 @@
1
- module Strain exposing (..)
1
+ module Strain exposing (discard, keep)
2
+
3
+
4
+ keep : (a -> Bool) -> List a -> List a
5
+ keep predicate list =
6
+ Debug.crash "Please implement this function"
7
+
8
+
9
+ discard : (a -> Bool) -> List a -> List a
10
+ discard predicate list =
11
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module Strain exposing (..)
1
+ module Strain exposing (discard, keep)
2
2
 
3
3
  import List
4
4
 
@@ -1,6 +1,18 @@
1
- module Sublist exposing (..)
1
+ module Sublist exposing (ListComparison(..), sublist, version)
2
2
 
3
3
 
4
4
  version : Int
5
5
  version =
6
6
  2
7
+
8
+
9
+ type ListComparison
10
+ = Equal
11
+ | Superlist
12
+ | Sublist
13
+ | Unequal
14
+
15
+
16
+ sublist : List a -> List a -> ListComparison
17
+ sublist alist blist =
18
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module Sublist exposing (..)
1
+ module Sublist exposing (ListComparison(..), sublist, version)
2
2
 
3
3
 
4
4
  version : Int
@@ -1 +1,6 @@
1
- module SumOfMultiples exposing (..)
1
+ module SumOfMultiples exposing (sumOfMultiples)
2
+
3
+
4
+ sumOfMultiples : List Int -> Int -> Int
5
+ sumOfMultiples multiples limit =
6
+ Debug.crash "Please implement this function"
@@ -1,4 +1,4 @@
1
- module SumOfMultiples exposing (..)
1
+ module SumOfMultiples exposing (sumOfMultiples)
2
2
 
3
3
 
4
4
  sumOfMultiples : List Int -> Int -> Int
@@ -0,0 +1,95 @@
1
+ # Transpose
2
+
3
+ Given an input text output it transposed.
4
+
5
+ Roughly explained, the transpose of a matrix:
6
+
7
+ ```text
8
+ ABC
9
+ DEF
10
+ ```
11
+
12
+ is given by:
13
+
14
+ ```text
15
+ AD
16
+ BE
17
+ CF
18
+ ```
19
+
20
+ Rows become columns and columns become rows. See <https://en.wikipedia.org/wiki/Transpose>.
21
+
22
+ If the input has rows of different lengths, this is to be solved as follows:
23
+
24
+ - Pad to the left with spaces.
25
+ - Don't pad to the right.
26
+
27
+ Therefore, transposing this matrix:
28
+
29
+ ```text
30
+ ABC
31
+ DE
32
+ ```
33
+
34
+ results in:
35
+
36
+ ```text
37
+ AD
38
+ BE
39
+ C
40
+ ```
41
+
42
+ And transposing:
43
+
44
+ ```text
45
+ AB
46
+ DEF
47
+ ```
48
+
49
+ results in:
50
+
51
+ ```text
52
+ AD
53
+ BE
54
+ F
55
+ ```
56
+
57
+ In general, all characters from the input should also be present in the transposed output.
58
+ That means that if a column in the input text contains only spaces on its bottom-most row(s),
59
+ the corresponding output row should contain the spaces in its right-most column(s).
60
+
61
+ ## Elm Installation
62
+
63
+ Refer to the [Exercism help page](http://exercism.io/languages/elm) for Elm
64
+ installation and learning resources.
65
+
66
+ ## Writing the Code
67
+
68
+ The first time you start an exercise, you'll need to ensure you have the
69
+ appropriate dependencies installed.
70
+
71
+ ```bash
72
+ $ elm-package install --yes
73
+ ```
74
+
75
+ Execute the tests with:
76
+
77
+ ```bash
78
+ $ elm-test
79
+ ```
80
+
81
+ Automatically run tests again when you save changes:
82
+
83
+ ```bash
84
+ $ elm-test --watch
85
+ ```
86
+
87
+ As you work your way through the test suite, be sure to remove the `skip <|`
88
+ calls from each test until you get them all passing!
89
+
90
+ ## Source
91
+
92
+ Reddit r/dailyprogrammer challenge #270 [Easy]. [https://www.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text](https://www.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text)
93
+
94
+ ## Submitting Incomplete Solutions
95
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.