trackler 2.2.1.138 → 2.2.1.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/crypto-square/description.md +23 -19
  4. data/problem-specifications/exercises/yacht/canonical-data.json +10 -1
  5. data/tracks/clojure/exercises/gigasecond/src/gigasecond.clj +5 -0
  6. data/tracks/clojure/exercises/grade-school/src/grade_school.clj +13 -0
  7. data/tracks/clojure/exercises/grains/src/grains.clj +9 -0
  8. data/tracks/clojure/exercises/minesweeper/src/minesweeper.clj +5 -0
  9. data/tracks/fsharp/docs/GENERATORS.md +12 -14
  10. data/tracks/fsharp/exercises/bowling/BowlingTest.fs +15 -15
  11. data/tracks/fsharp/exercises/perfect-numbers/PerfectNumbersTest.fs +11 -11
  12. data/tracks/fsharp/exercises/rna-transcription/Example.fs +7 -15
  13. data/tracks/fsharp/exercises/rna-transcription/RnaTranscription.fs +1 -1
  14. data/tracks/fsharp/exercises/rna-transcription/RnaTranscriptionTest.fs +5 -5
  15. data/tracks/fsharp/exercises/robot-simulator/RobotSimulatorTest.fs +34 -34
  16. data/tracks/fsharp/exercises/sublist/Example.fs +1 -1
  17. data/tracks/fsharp/exercises/sublist/Sublist.fs +1 -1
  18. data/tracks/fsharp/exercises/sublist/SublistTest.fs +17 -17
  19. data/tracks/fsharp/exercises/word-search/WordSearchTest.fs +56 -57
  20. data/tracks/fsharp/generators/CanonicalData.fs +14 -15
  21. data/tracks/fsharp/generators/Common.fs +4 -84
  22. data/tracks/fsharp/generators/Conversion.fs +75 -0
  23. data/tracks/fsharp/generators/Exercise.fs +15 -11
  24. data/tracks/fsharp/generators/Generators.fs +294 -468
  25. data/tracks/fsharp/generators/Generators.fsproj +2 -1
  26. data/tracks/fsharp/generators/Rendering.fs +169 -61
  27. data/tracks/fsharp/generators/Templates.fs +64 -0
  28. data/tracks/fsharp/generators/Track.fs +3 -3
  29. data/tracks/idris/exercises/accumulate/src/Example.idr +1 -1
  30. data/tracks/idris/exercises/accumulate/src/Test/Accumulate.idr +2 -2
  31. data/tracks/java/exercises/rna-transcription/.meta/hints.md +2 -0
  32. data/tracks/java/exercises/rna-transcription/README.md +6 -0
  33. data/tracks/nim/.gitignore +1 -0
  34. data/tracks/nim/config.json +38 -0
  35. data/tracks/nim/config/maintainers.json +10 -0
  36. data/tracks/nim/docs/ABOUT.md +7 -0
  37. data/tracks/nim/exercises/bob/README.md +2 -0
  38. data/tracks/nim/exercises/bob/bob_test.nim +31 -13
  39. data/tracks/nim/exercises/bob/example.nim +2 -2
  40. data/tracks/nim/exercises/gigasecond/README.md +22 -0
  41. data/tracks/nim/exercises/gigasecond/example.nim +4 -0
  42. data/tracks/nim/exercises/gigasecond/gigasecond_test.nim +32 -0
  43. data/tracks/nim/exercises/isogram/README.md +20 -0
  44. data/tracks/nim/exercises/isogram/example.nim +6 -0
  45. data/tracks/nim/exercises/isogram/isogram_test.nim +32 -0
  46. data/tracks/nim/exercises/space-age/README.md +24 -0
  47. data/tracks/nim/exercises/space-age/example.nim +17 -0
  48. data/tracks/nim/exercises/space-age/space_age_test.nim +29 -0
  49. data/tracks/nim/exercises/triangle/example.nim +22 -22
  50. data/tracks/nim/exercises/triangle/triangle_test.nim +32 -44
  51. metadata +19 -3
  52. data/tracks/fsharp/generators/Formatting.fs +0 -189
@@ -9,121 +9,121 @@ open RobotSimulator
9
9
 
10
10
  [<Fact>]
11
11
  let ``Robots are created with a position and direction`` () =
12
- let robot = create North (0, 0)
13
- let expected = create North (0, 0)
12
+ let robot = create Direction.North (0, 0)
13
+ let expected = create Direction.North (0, 0)
14
14
  robot |> should equal expected
15
15
 
16
16
  [<Fact(Skip = "Remove to run test")>]
17
17
  let ``Negative positions are allowed`` () =
18
- let robot = create South (-1, -1)
19
- let expected = create South (-1, -1)
18
+ let robot = create Direction.South (-1, -1)
19
+ let expected = create Direction.South (-1, -1)
20
20
  robot |> should equal expected
21
21
 
22
22
  [<Fact(Skip = "Remove to run test")>]
23
23
  let ``turnRight does not change the position`` () =
24
- let robot = create North (0, 0)
24
+ let robot = create Direction.North (0, 0)
25
25
  let sut = turnRight robot
26
26
  sut.position |> should equal (0, 0)
27
27
 
28
28
  [<Fact(Skip = "Remove to run test")>]
29
29
  let ``turnRight changes the direction from north to east`` () =
30
- let robot = create North (0, 0)
30
+ let robot = create Direction.North (0, 0)
31
31
  let sut = turnRight robot
32
- sut.direction |> should equal East
32
+ sut.direction |> should equal Direction.East
33
33
 
34
34
  [<Fact(Skip = "Remove to run test")>]
35
35
  let ``turnRight changes the direction from east to south`` () =
36
- let robot = create East (0, 0)
36
+ let robot = create Direction.East (0, 0)
37
37
  let sut = turnRight robot
38
- sut.direction |> should equal South
38
+ sut.direction |> should equal Direction.South
39
39
 
40
40
  [<Fact(Skip = "Remove to run test")>]
41
41
  let ``turnRight changes the direction from south to west`` () =
42
- let robot = create South (0, 0)
42
+ let robot = create Direction.South (0, 0)
43
43
  let sut = turnRight robot
44
- sut.direction |> should equal West
44
+ sut.direction |> should equal Direction.West
45
45
 
46
46
  [<Fact(Skip = "Remove to run test")>]
47
47
  let ``turnRight changes the direction from west to north`` () =
48
- let robot = create West (0, 0)
48
+ let robot = create Direction.West (0, 0)
49
49
  let sut = turnRight robot
50
- sut.direction |> should equal North
50
+ sut.direction |> should equal Direction.North
51
51
 
52
52
  [<Fact(Skip = "Remove to run test")>]
53
53
  let ``turnLeft does not change the position`` () =
54
- let robot = create North (0, 0)
54
+ let robot = create Direction.North (0, 0)
55
55
  let sut = turnLeft robot
56
56
  sut.position |> should equal (0, 0)
57
57
 
58
58
  [<Fact(Skip = "Remove to run test")>]
59
59
  let ``turnLeft changes the direction from north to west`` () =
60
- let robot = create North (0, 0)
60
+ let robot = create Direction.North (0, 0)
61
61
  let sut = turnLeft robot
62
- sut.direction |> should equal West
62
+ sut.direction |> should equal Direction.West
63
63
 
64
64
  [<Fact(Skip = "Remove to run test")>]
65
65
  let ``turnLeft changes the direction from west to south`` () =
66
- let robot = create West (0, 0)
66
+ let robot = create Direction.West (0, 0)
67
67
  let sut = turnLeft robot
68
- sut.direction |> should equal South
68
+ sut.direction |> should equal Direction.South
69
69
 
70
70
  [<Fact(Skip = "Remove to run test")>]
71
71
  let ``turnLeft changes the direction from south to east`` () =
72
- let robot = create South (0, 0)
72
+ let robot = create Direction.South (0, 0)
73
73
  let sut = turnLeft robot
74
- sut.direction |> should equal East
74
+ sut.direction |> should equal Direction.East
75
75
 
76
76
  [<Fact(Skip = "Remove to run test")>]
77
77
  let ``turnLeft changes the direction from east to north`` () =
78
- let robot = create East (0, 0)
78
+ let robot = create Direction.East (0, 0)
79
79
  let sut = turnLeft robot
80
- sut.direction |> should equal North
80
+ sut.direction |> should equal Direction.North
81
81
 
82
82
  [<Fact(Skip = "Remove to run test")>]
83
83
  let ``advance does not change the direction`` () =
84
- let robot = create North (0, 0)
84
+ let robot = create Direction.North (0, 0)
85
85
  let sut = advance robot
86
- sut.direction |> should equal North
86
+ sut.direction |> should equal Direction.North
87
87
 
88
88
  [<Fact(Skip = "Remove to run test")>]
89
89
  let ``advance increases the y coordinate one when facing north`` () =
90
- let robot = create North (0, 0)
90
+ let robot = create Direction.North (0, 0)
91
91
  let sut = advance robot
92
92
  sut.position |> should equal (0, 1)
93
93
 
94
94
  [<Fact(Skip = "Remove to run test")>]
95
95
  let ``advance decreases the y coordinate by one when facing south`` () =
96
- let robot = create South (0, 0)
96
+ let robot = create Direction.South (0, 0)
97
97
  let sut = advance robot
98
98
  sut.position |> should equal (0, -1)
99
99
 
100
100
  [<Fact(Skip = "Remove to run test")>]
101
101
  let ``advance increases the x coordinate by one when facing east`` () =
102
- let robot = create East (0, 0)
102
+ let robot = create Direction.East (0, 0)
103
103
  let sut = advance robot
104
104
  sut.position |> should equal (1, 0)
105
105
 
106
106
  [<Fact(Skip = "Remove to run test")>]
107
107
  let ``advance decreases the x coordinate by one when facing west`` () =
108
- let robot = create West (0, 0)
108
+ let robot = create Direction.West (0, 0)
109
109
  let sut = advance robot
110
110
  sut.position |> should equal (-1, 0)
111
111
 
112
112
  [<Fact(Skip = "Remove to run test")>]
113
113
  let ``Instructions to move west and north`` () =
114
- let robot = create North (0, 0)
115
- let expected = create West (-4, 1)
114
+ let robot = create Direction.North (0, 0)
115
+ let expected = create Direction.West (-4, 1)
116
116
  instructions "LAAARALA" robot |> should equal expected
117
117
 
118
118
  [<Fact(Skip = "Remove to run test")>]
119
119
  let ``Instructions to move west and south`` () =
120
- let robot = create East (2, -7)
121
- let expected = create South (-3, -8)
120
+ let robot = create Direction.East (2, -7)
121
+ let expected = create Direction.South (-3, -8)
122
122
  instructions "RRAAAAALA" robot |> should equal expected
123
123
 
124
124
  [<Fact(Skip = "Remove to run test")>]
125
125
  let ``Instructions to move east and north`` () =
126
- let robot = create South (8, 4)
127
- let expected = create North (11, 5)
126
+ let robot = create Direction.South (8, 4)
127
+ let expected = create Direction.North (11, 5)
128
128
  instructions "LAAARRRALLLL" robot |> should equal expected
129
129
 
@@ -1,6 +1,6 @@
1
1
  module Sublist
2
2
 
3
- type Sublist = Equal | Sublist | Superlist | Unequal
3
+ type SublistType = Equal | Sublist | Superlist | Unequal
4
4
 
5
5
  let rec isSublist xs ys lx ly =
6
6
  let rec helper xs' ys' =
@@ -1,5 +1,5 @@
1
1
  module Sublist
2
2
 
3
- type Sublist = Equal | Sublist | Superlist | Unequal
3
+ type SublistType = Equal | Sublist | Superlist | Unequal
4
4
 
5
5
  let sublist xs ys = failwith "You need to implement this function."
@@ -11,101 +11,101 @@ open Sublist
11
11
  let ``Empty lists`` () =
12
12
  let listOne = []
13
13
  let listTwo = []
14
- sublist listOne listTwo |> should equal Equal
14
+ sublist listOne listTwo |> should equal SublistType.Equal
15
15
 
16
16
  [<Fact(Skip = "Remove to run test")>]
17
17
  let ``Empty list within non empty list`` () =
18
18
  let listOne = []
19
19
  let listTwo = [1; 2; 3]
20
- sublist listOne listTwo |> should equal Sublist
20
+ sublist listOne listTwo |> should equal SublistType.Sublist
21
21
 
22
22
  [<Fact(Skip = "Remove to run test")>]
23
23
  let ``Non empty list contains empty list`` () =
24
24
  let listOne = [1; 2; 3]
25
25
  let listTwo = []
26
- sublist listOne listTwo |> should equal Superlist
26
+ sublist listOne listTwo |> should equal SublistType.Superlist
27
27
 
28
28
  [<Fact(Skip = "Remove to run test")>]
29
29
  let ``List equals itself`` () =
30
30
  let listOne = [1; 2; 3]
31
31
  let listTwo = [1; 2; 3]
32
- sublist listOne listTwo |> should equal Equal
32
+ sublist listOne listTwo |> should equal SublistType.Equal
33
33
 
34
34
  [<Fact(Skip = "Remove to run test")>]
35
35
  let ``Different lists`` () =
36
36
  let listOne = [1; 2; 3]
37
37
  let listTwo = [2; 3; 4]
38
- sublist listOne listTwo |> should equal Unequal
38
+ sublist listOne listTwo |> should equal SublistType.Unequal
39
39
 
40
40
  [<Fact(Skip = "Remove to run test")>]
41
41
  let ``False start`` () =
42
42
  let listOne = [1; 2; 5]
43
43
  let listTwo = [0; 1; 2; 3; 1; 2; 5; 6]
44
- sublist listOne listTwo |> should equal Sublist
44
+ sublist listOne listTwo |> should equal SublistType.Sublist
45
45
 
46
46
  [<Fact(Skip = "Remove to run test")>]
47
47
  let ``Consecutive`` () =
48
48
  let listOne = [1; 1; 2]
49
49
  let listTwo = [0; 1; 1; 1; 2; 1; 2]
50
- sublist listOne listTwo |> should equal Sublist
50
+ sublist listOne listTwo |> should equal SublistType.Sublist
51
51
 
52
52
  [<Fact(Skip = "Remove to run test")>]
53
53
  let ``Sublist at start`` () =
54
54
  let listOne = [0; 1; 2]
55
55
  let listTwo = [0; 1; 2; 3; 4; 5]
56
- sublist listOne listTwo |> should equal Sublist
56
+ sublist listOne listTwo |> should equal SublistType.Sublist
57
57
 
58
58
  [<Fact(Skip = "Remove to run test")>]
59
59
  let ``Sublist in middle`` () =
60
60
  let listOne = [2; 3; 4]
61
61
  let listTwo = [0; 1; 2; 3; 4; 5]
62
- sublist listOne listTwo |> should equal Sublist
62
+ sublist listOne listTwo |> should equal SublistType.Sublist
63
63
 
64
64
  [<Fact(Skip = "Remove to run test")>]
65
65
  let ``Sublist at end`` () =
66
66
  let listOne = [3; 4; 5]
67
67
  let listTwo = [0; 1; 2; 3; 4; 5]
68
- sublist listOne listTwo |> should equal Sublist
68
+ sublist listOne listTwo |> should equal SublistType.Sublist
69
69
 
70
70
  [<Fact(Skip = "Remove to run test")>]
71
71
  let ``At start of superlist`` () =
72
72
  let listOne = [0; 1; 2; 3; 4; 5]
73
73
  let listTwo = [0; 1; 2]
74
- sublist listOne listTwo |> should equal Superlist
74
+ sublist listOne listTwo |> should equal SublistType.Superlist
75
75
 
76
76
  [<Fact(Skip = "Remove to run test")>]
77
77
  let ``In middle of superlist`` () =
78
78
  let listOne = [0; 1; 2; 3; 4; 5]
79
79
  let listTwo = [2; 3]
80
- sublist listOne listTwo |> should equal Superlist
80
+ sublist listOne listTwo |> should equal SublistType.Superlist
81
81
 
82
82
  [<Fact(Skip = "Remove to run test")>]
83
83
  let ``At end of superlist`` () =
84
84
  let listOne = [0; 1; 2; 3; 4; 5]
85
85
  let listTwo = [3; 4; 5]
86
- sublist listOne listTwo |> should equal Superlist
86
+ sublist listOne listTwo |> should equal SublistType.Superlist
87
87
 
88
88
  [<Fact(Skip = "Remove to run test")>]
89
89
  let ``First list missing element from second list`` () =
90
90
  let listOne = [1; 3]
91
91
  let listTwo = [1; 2; 3]
92
- sublist listOne listTwo |> should equal Unequal
92
+ sublist listOne listTwo |> should equal SublistType.Unequal
93
93
 
94
94
  [<Fact(Skip = "Remove to run test")>]
95
95
  let ``Second list missing element from first list`` () =
96
96
  let listOne = [1; 2; 3]
97
97
  let listTwo = [1; 3]
98
- sublist listOne listTwo |> should equal Unequal
98
+ sublist listOne listTwo |> should equal SublistType.Unequal
99
99
 
100
100
  [<Fact(Skip = "Remove to run test")>]
101
101
  let ``Order matters to a list`` () =
102
102
  let listOne = [1; 2; 3]
103
103
  let listTwo = [3; 2; 1]
104
- sublist listOne listTwo |> should equal Unequal
104
+ sublist listOne listTwo |> should equal SublistType.Unequal
105
105
 
106
106
  [<Fact(Skip = "Remove to run test")>]
107
107
  let ``Same digits but different numbers`` () =
108
108
  let listOne = [1; 0; 1]
109
109
  let listTwo = [10; 1]
110
- sublist listOne listTwo |> should equal Unequal
110
+ sublist listOne listTwo |> should equal SublistType.Unequal
111
111
 
@@ -18,28 +18,28 @@ let ``Should accept an initial game grid and a target search word`` () =
18
18
  let ``Should locate one word written left to right`` () =
19
19
  let grid = ["clojurermt"]
20
20
  let wordsToSearchFor = ["clojure"]
21
- let expected = [("clojure", Some (((1, 1), (7, 1))))] |> Map.ofList
21
+ let expected = [("clojure", Some ((1, 1), (7, 1)))] |> Map.ofList
22
22
  search grid wordsToSearchFor |> should equal expected
23
23
 
24
24
  [<Fact(Skip = "Remove to run test")>]
25
25
  let ``Should locate the same word written left to right in a different position`` () =
26
26
  let grid = ["mtclojurer"]
27
27
  let wordsToSearchFor = ["clojure"]
28
- let expected = [("clojure", Some (((3, 1), (9, 1))))] |> Map.ofList
28
+ let expected = [("clojure", Some ((3, 1), (9, 1)))] |> Map.ofList
29
29
  search grid wordsToSearchFor |> should equal expected
30
30
 
31
31
  [<Fact(Skip = "Remove to run test")>]
32
32
  let ``Should locate a different left to right word`` () =
33
33
  let grid = ["coffeelplx"]
34
34
  let wordsToSearchFor = ["coffee"]
35
- let expected = [("coffee", Some (((1, 1), (6, 1))))] |> Map.ofList
35
+ let expected = [("coffee", Some ((1, 1), (6, 1)))] |> Map.ofList
36
36
  search grid wordsToSearchFor |> should equal expected
37
37
 
38
38
  [<Fact(Skip = "Remove to run test")>]
39
39
  let ``Should locate that different left to right word in a different position`` () =
40
40
  let grid = ["xcoffeezlp"]
41
41
  let wordsToSearchFor = ["coffee"]
42
- let expected = [("coffee", Some (((2, 1), (7, 1))))] |> Map.ofList
42
+ let expected = [("coffee", Some ((2, 1), (7, 1)))] |> Map.ofList
43
43
  search grid wordsToSearchFor |> should equal expected
44
44
 
45
45
  [<Fact(Skip = "Remove to run test")>]
@@ -48,7 +48,7 @@ let ``Should locate a left to right word in two line grid`` () =
48
48
  [ "jefblpepre";
49
49
  "tclojurerm" ]
50
50
  let wordsToSearchFor = ["clojure"]
51
- let expected = [("clojure", Some (((2, 2), (8, 2))))] |> Map.ofList
51
+ let expected = [("clojure", Some ((2, 2), (8, 2)))] |> Map.ofList
52
52
  search grid wordsToSearchFor |> should equal expected
53
53
 
54
54
  [<Fact(Skip = "Remove to run test")>]
@@ -58,7 +58,7 @@ let ``Should locate a left to right word in three line grid`` () =
58
58
  "jefblpepre";
59
59
  "clojurermt" ]
60
60
  let wordsToSearchFor = ["clojure"]
61
- let expected = [("clojure", Some (((1, 3), (7, 3))))] |> Map.ofList
61
+ let expected = [("clojure", Some ((1, 3), (7, 3)))] |> Map.ofList
62
62
  search grid wordsToSearchFor |> should equal expected
63
63
 
64
64
  [<Fact(Skip = "Remove to run test")>]
@@ -75,7 +75,7 @@ let ``Should locate a left to right word in ten line grid`` () =
75
75
  "jalaycalmp";
76
76
  "clojurermt" ]
77
77
  let wordsToSearchFor = ["clojure"]
78
- let expected = [("clojure", Some (((1, 10), (7, 10))))] |> Map.ofList
78
+ let expected = [("clojure", Some ((1, 10), (7, 10)))] |> Map.ofList
79
79
  search grid wordsToSearchFor |> should equal expected
80
80
 
81
81
  [<Fact(Skip = "Remove to run test")>]
@@ -92,7 +92,7 @@ let ``Should locate that left to right word in a different position in a ten lin
92
92
  "clojurermt";
93
93
  "jalaycalmp" ]
94
94
  let wordsToSearchFor = ["clojure"]
95
- let expected = [("clojure", Some (((1, 9), (7, 9))))] |> Map.ofList
95
+ let expected = [("clojure", Some ((1, 9), (7, 9)))] |> Map.ofList
96
96
  search grid wordsToSearchFor |> should equal expected
97
97
 
98
98
  [<Fact(Skip = "Remove to run test")>]
@@ -109,7 +109,7 @@ let ``Should locate a different left to right word in a ten line grid`` () =
109
109
  "clojurermt";
110
110
  "jalaycalmp" ]
111
111
  let wordsToSearchFor = ["fortran"]
112
- let expected = [("fortran", Some (((1, 7), (7, 7))))] |> Map.ofList
112
+ let expected = [("fortran", Some ((1, 7), (7, 7)))] |> Map.ofList
113
113
  search grid wordsToSearchFor |> should equal expected
114
114
 
115
115
  [<Fact(Skip = "Remove to run test")>]
@@ -127,8 +127,8 @@ let ``Should locate multiple words`` () =
127
127
  "clojurermt" ]
128
128
  let wordsToSearchFor = ["fortran"; "clojure"]
129
129
  let expected =
130
- [ ("clojure", Some (((1, 10), (7, 10))));
131
- ("fortran", Some (((1, 7), (7, 7)))) ]
130
+ [ ("clojure", Some ((1, 10), (7, 10)));
131
+ ("fortran", Some ((1, 7), (7, 7))) ]
132
132
  |> Map.ofList
133
133
  search grid wordsToSearchFor |> should equal expected
134
134
 
@@ -136,7 +136,7 @@ let ``Should locate multiple words`` () =
136
136
  let ``Should locate a single word written right to left`` () =
137
137
  let grid = ["rixilelhrs"]
138
138
  let wordsToSearchFor = ["elixir"]
139
- let expected = [("elixir", Some (((6, 1), (1, 1))))] |> Map.ofList
139
+ let expected = [("elixir", Some ((6, 1), (1, 1)))] |> Map.ofList
140
140
  search grid wordsToSearchFor |> should equal expected
141
141
 
142
142
  [<Fact(Skip = "Remove to run test")>]
@@ -154,8 +154,8 @@ let ``Should locate multiple words written in different horizontal directions``
154
154
  "clojurermt" ]
155
155
  let wordsToSearchFor = ["elixir"; "clojure"]
156
156
  let expected =
157
- [ ("clojure", Some (((1, 10), (7, 10))));
158
- ("elixir", Some (((6, 5), (1, 5)))) ]
157
+ [ ("clojure", Some ((1, 10), (7, 10)));
158
+ ("elixir", Some ((6, 5), (1, 5))) ]
159
159
  |> Map.ofList
160
160
  search grid wordsToSearchFor |> should equal expected
161
161
 
@@ -174,9 +174,9 @@ let ``Should locate words written top to bottom`` () =
174
174
  "clojurermt" ]
175
175
  let wordsToSearchFor = ["clojure"; "elixir"; "ecmascript"]
176
176
  let expected =
177
- [ ("clojure", Some (((1, 10), (7, 10))));
178
- ("elixir", Some (((6, 5), (1, 5))));
179
- ("ecmascript", Some (((10, 1), (10, 10)))) ]
177
+ [ ("clojure", Some ((1, 10), (7, 10)));
178
+ ("elixir", Some ((6, 5), (1, 5)));
179
+ ("ecmascript", Some ((10, 1), (10, 10))) ]
180
180
  |> Map.ofList
181
181
  search grid wordsToSearchFor |> should equal expected
182
182
 
@@ -195,10 +195,10 @@ let ``Should locate words written bottom to top`` () =
195
195
  "clojurermt" ]
196
196
  let wordsToSearchFor = ["clojure"; "elixir"; "ecmascript"; "rust"]
197
197
  let expected =
198
- [ ("clojure", Some (((1, 10), (7, 10))));
199
- ("elixir", Some (((6, 5), (1, 5))));
200
- ("ecmascript", Some (((10, 1), (10, 10))));
201
- ("rust", Some (((9, 5), (9, 2)))) ]
198
+ [ ("clojure", Some ((1, 10), (7, 10)));
199
+ ("elixir", Some ((6, 5), (1, 5)));
200
+ ("ecmascript", Some ((10, 1), (10, 10)));
201
+ ("rust", Some ((9, 5), (9, 2))) ]
202
202
  |> Map.ofList
203
203
  search grid wordsToSearchFor |> should equal expected
204
204
 
@@ -217,11 +217,11 @@ let ``Should locate words written top left to bottom right`` () =
217
217
  "clojurermt" ]
218
218
  let wordsToSearchFor = ["clojure"; "elixir"; "ecmascript"; "rust"; "java"]
219
219
  let expected =
220
- [ ("clojure", Some (((1, 10), (7, 10))));
221
- ("elixir", Some (((6, 5), (1, 5))));
222
- ("ecmascript", Some (((10, 1), (10, 10))));
223
- ("rust", Some (((9, 5), (9, 2))));
224
- ("java", Some (((1, 1), (4, 4)))) ]
220
+ [ ("clojure", Some ((1, 10), (7, 10)));
221
+ ("elixir", Some ((6, 5), (1, 5)));
222
+ ("ecmascript", Some ((10, 1), (10, 10)));
223
+ ("rust", Some ((9, 5), (9, 2)));
224
+ ("java", Some ((1, 1), (4, 4))) ]
225
225
  |> Map.ofList
226
226
  search grid wordsToSearchFor |> should equal expected
227
227
 
@@ -240,12 +240,12 @@ let ``Should locate words written bottom right to top left`` () =
240
240
  "clojurermt" ]
241
241
  let wordsToSearchFor = ["clojure"; "elixir"; "ecmascript"; "rust"; "java"; "lua"]
242
242
  let expected =
243
- [ ("clojure", Some (((1, 10), (7, 10))));
244
- ("elixir", Some (((6, 5), (1, 5))));
245
- ("ecmascript", Some (((10, 1), (10, 10))));
246
- ("rust", Some (((9, 5), (9, 2))));
247
- ("java", Some (((1, 1), (4, 4))));
248
- ("lua", Some (((8, 9), (6, 7)))) ]
243
+ [ ("clojure", Some ((1, 10), (7, 10)));
244
+ ("elixir", Some ((6, 5), (1, 5)));
245
+ ("ecmascript", Some ((10, 1), (10, 10)));
246
+ ("rust", Some ((9, 5), (9, 2)));
247
+ ("java", Some ((1, 1), (4, 4)));
248
+ ("lua", Some ((8, 9), (6, 7))) ]
249
249
  |> Map.ofList
250
250
  search grid wordsToSearchFor |> should equal expected
251
251
 
@@ -264,13 +264,13 @@ let ``Should locate words written bottom left to top right`` () =
264
264
  "clojurermt" ]
265
265
  let wordsToSearchFor = ["clojure"; "elixir"; "ecmascript"; "rust"; "java"; "lua"; "lisp"]
266
266
  let expected =
267
- [ ("clojure", Some (((1, 10), (7, 10))));
268
- ("elixir", Some (((6, 5), (1, 5))));
269
- ("ecmascript", Some (((10, 1), (10, 10))));
270
- ("rust", Some (((9, 5), (9, 2))));
271
- ("java", Some (((1, 1), (4, 4))));
272
- ("lua", Some (((8, 9), (6, 7))));
273
- ("lisp", Some (((3, 6), (6, 3)))) ]
267
+ [ ("clojure", Some ((1, 10), (7, 10)));
268
+ ("elixir", Some ((6, 5), (1, 5)));
269
+ ("ecmascript", Some ((10, 1), (10, 10)));
270
+ ("rust", Some ((9, 5), (9, 2)));
271
+ ("java", Some ((1, 1), (4, 4)));
272
+ ("lua", Some ((8, 9), (6, 7)));
273
+ ("lisp", Some ((3, 6), (6, 3))) ]
274
274
  |> Map.ofList
275
275
  search grid wordsToSearchFor |> should equal expected
276
276
 
@@ -289,14 +289,14 @@ let ``Should locate words written top right to bottom left`` () =
289
289
  "clojurermt" ]
290
290
  let wordsToSearchFor = ["clojure"; "elixir"; "ecmascript"; "rust"; "java"; "lua"; "lisp"; "ruby"]
291
291
  let expected =
292
- [ ("clojure", Some (((1, 10), (7, 10))));
293
- ("elixir", Some (((6, 5), (1, 5))));
294
- ("ecmascript", Some (((10, 1), (10, 10))));
295
- ("rust", Some (((9, 5), (9, 2))));
296
- ("java", Some (((1, 1), (4, 4))));
297
- ("lua", Some (((8, 9), (6, 7))));
298
- ("lisp", Some (((3, 6), (6, 3))));
299
- ("ruby", Some (((8, 6), (5, 9)))) ]
292
+ [ ("clojure", Some ((1, 10), (7, 10)));
293
+ ("elixir", Some ((6, 5), (1, 5)));
294
+ ("ecmascript", Some ((10, 1), (10, 10)));
295
+ ("rust", Some ((9, 5), (9, 2)));
296
+ ("java", Some ((1, 1), (4, 4)));
297
+ ("lua", Some ((8, 9), (6, 7)));
298
+ ("lisp", Some ((3, 6), (6, 3)));
299
+ ("ruby", Some ((8, 6), (5, 9))) ]
300
300
  |> Map.ofList
301
301
  search grid wordsToSearchFor |> should equal expected
302
302
 
@@ -313,17 +313,16 @@ let ``Should fail to locate a word that is not in the puzzle`` () =
313
313
  "alxhpburyi";
314
314
  "jalaycalmp";
315
315
  "clojurermt" ]
316
- let wordsToSearchFor = ["clojure"; "elixir"; "ecmascript"; "rust"; "java"; "lua"; "lisp"; "ruby";
317
- "haskell"]
316
+ let wordsToSearchFor = ["clojure"; "elixir"; "ecmascript"; "rust"; "java"; "lua"; "lisp"; "ruby"; "haskell"]
318
317
  let expected =
319
- [ ("clojure", Some (((1, 10), (7, 10))));
320
- ("elixir", Some (((6, 5), (1, 5))));
321
- ("ecmascript", Some (((10, 1), (10, 10))));
322
- ("rust", Some (((9, 5), (9, 2))));
323
- ("java", Some (((1, 1), (4, 4))));
324
- ("lua", Some (((8, 9), (6, 7))));
325
- ("lisp", Some (((3, 6), (6, 3))));
326
- ("ruby", Some (((8, 6), (5, 9))));
318
+ [ ("clojure", Some ((1, 10), (7, 10)));
319
+ ("elixir", Some ((6, 5), (1, 5)));
320
+ ("ecmascript", Some ((10, 1), (10, 10)));
321
+ ("rust", Some ((9, 5), (9, 2)));
322
+ ("java", Some ((1, 1), (4, 4)));
323
+ ("lua", Some ((8, 9), (6, 7)));
324
+ ("lisp", Some ((3, 6), (6, 3)));
325
+ ("ruby", Some ((8, 6), (5, 9)));
327
326
  ("haskell", Option<((int * int) * (int * int))>.None) ]
328
327
  |> Map.ofList
329
328
  search grid wordsToSearchFor |> should equal expected