trackler 2.0.3.7 → 2.0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/largest-series-product/canonical-data.json +6 -18
  3. data/lib/trackler/version.rb +1 -1
  4. data/tracks/clojure/exercises/robot-name/src/example.clj +2 -3
  5. data/tracks/fsharp/build.fsx +5 -5
  6. data/tracks/fsharp/config.json +5 -5
  7. data/tracks/fsharp/exercises/difference-of-squares/HINTS.md +3 -0
  8. data/tracks/fsharp/exercises/grains/HINTS.md +4 -0
  9. data/tracks/fsharp/exercises/hello-world/HINTS.md +5 -0
  10. data/tracks/fsharp/exercises/rna-transcription/HINTS.md +3 -0
  11. data/tracks/fsharp/paket.lock +3 -3
  12. data/tracks/lisp/exercises/word-count/word-count-test.lisp +2 -2
  13. data/tracks/objective-c/.gitignore +1 -0
  14. data/tracks/objective-c/config.json +8 -0
  15. data/tracks/objective-c/exercises/allergies/AllergiesExample.m +1 -5
  16. data/tracks/objective-c/exercises/allergies/AllergiesTest.m +4 -4
  17. data/tracks/objective-c/exercises/clock/ClockExample.m +20 -15
  18. data/tracks/objective-c/exercises/clock/ClockTest.m +1 -1
  19. data/tracks/objective-c/exercises/gigasecond/GigasecondTest.m +18 -18
  20. data/tracks/objective-c/exercises/hello-world/HelloWorldExample.m +2 -2
  21. data/tracks/objective-c/exercises/isogram/IsogramExample.h +7 -0
  22. data/tracks/objective-c/exercises/isogram/IsogramExample.m +28 -0
  23. data/tracks/objective-c/exercises/isogram/IsogramTest.m +47 -0
  24. data/tracks/objective-c/exercises/largest-series-product/LargestSeriesProductExample.m +1 -1
  25. data/tracks/objective-c/exercises/largest-series-product/LargestSeriesProductTest.m +1 -1
  26. data/tracks/objective-c/exercises/meetup/MeetupExample.m +1 -3
  27. data/tracks/objective-c/exercises/secret-handshake/SecretHandshakeExample.m +6 -7
  28. data/tracks/objective-c/exercises/space-age/SpaceAgeTest.m +8 -8
  29. data/tracks/objective-c/exercises/sum-of-multiples/SumOfMultiplesExample.m +1 -1
  30. data/tracks/objective-c/exercises/transpose/TransposeTest.m +1 -1
  31. data/tracks/objective-c/exercises/triangle/TriangleExample.m +2 -2
  32. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +18 -0
  33. data/tracks/perl6/.travis.yml +0 -4
  34. data/tracks/perl6/exercises/phone-number/Example.pm +2 -2
  35. data/tracks/perl6/exercises/phone-number/phone.t +1 -8
  36. data/tracks/scala/config.json +2 -1
  37. data/tracks/scala/exercises/sum-of-multiples/example.scala +1 -1
  38. data/tracks/scala/exercises/sum-of-multiples/src/main/scala/SumOfMultiples.scala +4 -0
  39. data/tracks/scala/exercises/sum-of-multiples/src/test/scala/SumOfMultiplesTest.scala +12 -12
  40. metadata +10 -3
  41. data/tracks/objective-c/xcodeProject/compile_commands.json +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7778e095275365245b61d227de2380686d8f52a6
4
- data.tar.gz: baf69491b1aa86f855c0a3a0dc312c169d3f91b7
3
+ metadata.gz: 26859b54fc9507930d1491868635aa16867347f6
4
+ data.tar.gz: 9b58994afd40bf481622cad4dcc0bb4528078ff8
5
5
  SHA512:
6
- metadata.gz: ef3092dcc542059ebcb8dce86d78c9e36ab07624096d962b469cb06a00d16a6f85684e7a015e8dfd32446172b33b8e49b4ecdb3c01e40eed7d187b5f80beeb11
7
- data.tar.gz: 55cb0a7661c46826a0272c15bb231790ada521268054b488e4d219819b61231b0a9cb7ccee5a1e1cd9f3f80923f64187d8d357221322b1799098ab15829d5ad6
6
+ metadata.gz: 7f55463ac98a1e18ded0523c929796b44a226ead128bb7015de7161469b87e9dca58b4b2353ec203ce2e8e9f7d8c2deaa811991bcefa6beb32acf880312a684a
7
+ data.tar.gz: fd3ea88f64020af3af7fa037ef1de5afb2ad895873ef15d9e21efb0c94728c79faaeb30fada44974a6da4ee367789c6cfcee0f8d5d84d5d5177b2433540f41b8
@@ -13,6 +13,12 @@
13
13
  "e.g. The implementation which makes a single pass through the digits."
14
14
  ],
15
15
  "cases": [
16
+ {
17
+ "description": "finds the largest product if span equals length",
18
+ "digits": "29",
19
+ "span": 2,
20
+ "expected": 18
21
+ },
16
22
  {
17
23
  "description": "can find the largest product of 2 with numbers in order",
18
24
  "digits": "0123456789",
@@ -25,12 +31,6 @@
25
31
  "span": 2,
26
32
  "expected": 48
27
33
  },
28
- {
29
- "description": "finds the largest product if span equals length",
30
- "digits": "29",
31
- "span": 2,
32
- "expected": 18
33
- },
34
34
  {
35
35
  "description": "can find the largest product of 3 with numbers in order",
36
36
  "digits": "0123456789",
@@ -55,18 +55,6 @@
55
55
  "span": 6,
56
56
  "expected": 23520
57
57
  },
58
- {
59
- "description": "can get the largest product of a big number II",
60
- "digits": "52677741234314237566414902593461595376319419139427",
61
- "span": 6,
62
- "expected": 28350
63
- },
64
- {
65
- "description": "can get the largest product of a big number (Project Euler)",
66
- "digits": "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450",
67
- "span": 13,
68
- "expected": 23514624000
69
- },
70
58
  {
71
59
  "description": "reports zero if the only digits are zero",
72
60
  "digits": "0000",
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.3.7"
2
+ VERSION = "2.0.3.8"
3
3
  end
@@ -1,10 +1,9 @@
1
1
  (ns robot-name)
2
2
 
3
- (def ^:private random (java.util.Random.))
4
3
  (def ^:private letters (map char (range 65 91)))
5
4
  (defn- generate-name []
6
- (str (apply str (take 2 (shuffle letters)))
7
- (+ 100 (.nextInt random 899))))
5
+ (format "%s%03d" (apply str (repeatedly 2 #(rand-nth letters)))
6
+ (rand-int 1000)))
8
7
 
9
8
  (defn robot []
10
9
  (atom {:name (generate-name)}))
@@ -21,19 +21,19 @@ Target "Copy" (fun _ -> CopyDir buildDir sourceDir allFiles)
21
21
 
22
22
  Target "BuildUnchanged" (fun _ ->
23
23
  MSBuildRelease buildDir "Build" [solutionFile]
24
- |> Log "AppBuild-Output: "
24
+ |> Log "Build unchanged: "
25
25
  )
26
26
 
27
27
  Target "PrepareTests" (fun _ ->
28
- let ignorePattern = "(\[<Ignore\(\"Remove to run test\"\)>]|, Ignore = \"Remove to run test case\")"
28
+ let ignorePattern = "(\[<Ignore\(\"Remove to run test\"\)>\]|, Ignore = \"Remove to run test case\")"
29
29
 
30
- !! (buildDir @@ "**/*Test?.fs")
30
+ !! (buildDir @@ "**/*Test.fs")
31
31
  |> RegexReplaceInFilesWithEncoding ignorePattern "" System.Text.Encoding.UTF8
32
32
  )
33
33
 
34
34
  Target "BuildWithAllTests" (fun _ ->
35
- MSBuildRelease buildDir "Build" [solutionFile]
36
- |> Log "AppBuild-Output: "
35
+ MSBuildRelease buildDir "Rebuild" [solutionFile]
36
+ |> Log "Build with tests: "
37
37
  )
38
38
 
39
39
  Target "Test" (fun _ ->
@@ -13,18 +13,18 @@
13
13
  ]
14
14
  },
15
15
  {
16
- "slug": "bob",
16
+ "slug": "leap",
17
17
  "difficulty": 1,
18
18
  "topics": [
19
- "Strings",
20
- "Control-flow (if-else statements)"
19
+ "Integers"
21
20
  ]
22
21
  },
23
22
  {
24
- "slug": "leap",
23
+ "slug": "bob",
25
24
  "difficulty": 1,
26
25
  "topics": [
27
- "Integers"
26
+ "Strings",
27
+ "Control-flow (if-else statements)"
28
28
  ]
29
29
  },
30
30
  {
@@ -0,0 +1,3 @@
1
+ ## Hints
2
+ For this exercise the following F# feature comes in handy:
3
+ - [Seq.sumBy](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/seq.sumby%5B't,%5Eu%5D-function-%5Bfsharp%5D) is a condensed format to apply a function to a sequence and then sum the results
@@ -0,0 +1,4 @@
1
+ ## Hints
2
+ For this exercise the following F# feature comes in handy:
3
+ - [BigInt](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/numerics.biginteger-structure-%5Bfsharp%5D)
4
+ - [Seq.sumBy](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/seq.sumby%5B't,%5Eu%5D-function-%5Bfsharp%5D) is a condensed format to apply a function to a sequence and then sum the results
@@ -0,0 +1,5 @@
1
+ ## Hints
2
+ For this exercise the following F# feature comes in handy:
3
+ - [Match Expressions](https://fsharpforfunandprofit.com/posts/match-expression/) Also known as pattern matching which is like a switch statement on steriods. It's a very powerful ability in the F# language and will come in handy in many of the exercises. While this example can be trivially solved with an if/else, pattern matching is more idiomatic.
4
+ - [sprintf](https://fsharpforfunandprofit.com/posts/printf/) While F# supports string concatenation using sprintf leads to easier to read solutions and is also idiomatic
5
+ - [defaultArg](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/operators.defaultarg%5B't%5D-function-%5Bfsharp%5D) Default arg is useful when extracting a value from an option type and providing a value when None is encountered.
@@ -0,0 +1,3 @@
1
+ ## Hints
2
+ For this exercise the following F# feature comes in handy:
3
+ - [Match Expressions](https://fsharpforfunandprofit.com/posts/match-expression/) While this can be solved using a dictionary, using a match expression is more idiomatic.
@@ -1,7 +1,7 @@
1
1
  NUGET
2
2
  remote: https://www.nuget.org/api/v2
3
- FAKE (4.35.1)
3
+ FAKE (4.46.1)
4
4
  FParsec (1.0.2)
5
5
  FSharp.Core (4.0.0.1)
6
- NUnit (3.4.1)
7
- NUnit.ConsoleRunner (3.4.1)
6
+ NUnit (3.5)
7
+ NUnit.ConsoleRunner (3.5)
@@ -12,8 +12,8 @@
12
12
  values of the items must match. But the order is not
13
13
  important. Equality is tested with equal"
14
14
  (assert-equal
15
- (sort expected #'string< :key #'car)
16
- (sort actual #'string< :key #'car)))
15
+ (sort (copy-seq expected) #'string< :key #'car)
16
+ (sort (copy-seq actual) #'string< :key #'car)))
17
17
 
18
18
  (define-test count-one-word
19
19
  (assert-assoc-equal '(("word" . 1))
@@ -23,3 +23,4 @@ DerivedData
23
23
  *.hmap
24
24
  *.ipa
25
25
  *.xcuserstate
26
+ compile_commands.json
@@ -97,6 +97,14 @@
97
97
  "Transforming"
98
98
  ]
99
99
  },
100
+ {
101
+ "difficulty": 2,
102
+ "slug": "isogram",
103
+ "topics": [
104
+ "Strings",
105
+ "Filtering"
106
+ ]
107
+ },
100
108
  {
101
109
  "difficulty": 3,
102
110
  "slug": "clock",
@@ -20,11 +20,7 @@
20
20
 
21
21
 
22
22
  - (BOOL)hasAllergy:(Allergen)allergen {
23
- if ((allergen & self.score) == allergen) {
24
- return true;
25
- } else {
26
- return false;
27
- }
23
+ return (allergen & self.score) == allergen;
28
24
  }
29
25
 
30
26
  @end
@@ -16,28 +16,28 @@
16
16
  return @[@(AllergenEggs), @(AllergenPeanuts), @(AllergenShellfish), @(AllergenStrawberries), @(AllergenTomatoes), @(AllergenChocolate), @(AllergenPollen), @(AllergenCats)];
17
17
  }
18
18
 
19
- - (void)testAllergicToEggs {
19
+ - (void)testAllergicToEggs { //!OCLint
20
20
  Allergies *allergies = [[Allergies alloc] initWithScore:1];
21
21
  XCTAssertTrue([allergies hasAllergy:AllergenEggs]);
22
22
  XCTAssertFalse([allergies hasAllergy:AllergenPeanuts]);
23
23
  XCTAssertFalse([allergies hasAllergy:AllergenPollen]);
24
24
  }
25
25
 
26
- - (void)testAllergicToChocolate {
26
+ - (void)testAllergicToChocolate { //!OCLint
27
27
  Allergies *allergies = [[Allergies alloc] initWithScore:32];
28
28
  XCTAssertTrue([allergies hasAllergy:AllergenChocolate]);
29
29
  XCTAssertFalse([allergies hasAllergy:AllergenEggs]);
30
30
  XCTAssertFalse([allergies hasAllergy:AllergenTomatoes]);
31
31
  }
32
32
 
33
- - (void)testBob {
33
+ - (void)testBob { //!OCLint
34
34
  Allergies *allergies = [[Allergies alloc] initWithScore:34];
35
35
  XCTAssertTrue([allergies hasAllergy:AllergenPeanuts], "Bob is allergic to peanuts");
36
36
  XCTAssertTrue([allergies hasAllergy:AllergenChocolate], "Bob is allergic to chocolate");
37
37
  XCTAssertFalse([allergies hasAllergy:AllergenCats], "Bob is not allergic to cats");
38
38
  }
39
39
 
40
- - (void)testEggsAndCats {
40
+ - (void)testEggsAndCats { //!OCLint
41
41
  Allergies *allergies = [[Allergies alloc] initWithScore:129];
42
42
  XCTAssertTrue([allergies hasAllergy:AllergenEggs]);
43
43
  XCTAssertTrue([allergies hasAllergy:AllergenCats]);
@@ -1,8 +1,13 @@
1
1
  #import "ClockExample.h"
2
2
 
3
- @implementation Clock {
4
- int _hours, _minutes;
5
- }
3
+ @interface Clock ()
4
+
5
+ @property (nonatomic, assign) int hours;
6
+ @property (nonatomic, assign) int minutes;
7
+
8
+ @end
9
+
10
+ @implementation Clock
6
11
 
7
12
  + (Clock *)clockWithHours:(int)hours minutes:(int)minutes {
8
13
  return [[Clock alloc] initWithHours:hours minutes:minutes];
@@ -23,27 +28,27 @@
23
28
  }
24
29
 
25
30
  - (void)normalize {
26
- if (_minutes >= 60) {
27
- _hours += _minutes / 60;
28
- _minutes = _minutes % 60;
31
+ if (self.minutes >= 60) {
32
+ self.hours += self.minutes / 60;
33
+ self.minutes = self.minutes % 60;
29
34
  }
30
35
 
31
- while (_minutes < 0) {
32
- _hours -= 1;
33
- _minutes += 60;
36
+ while (self.minutes < 0) {
37
+ self.hours -= 1;
38
+ self.minutes += 60;
34
39
  }
35
40
 
36
- if (_hours >= 24) {
37
- _hours = _hours % 24;
41
+ if (self.hours >= 24) {
42
+ self.hours = self.hours % 24;
38
43
  }
39
44
 
40
- while (_hours < 0) {
41
- _hours += 24;
45
+ while (self.hours < 0) {
46
+ self.hours += 24;
42
47
  }
43
48
  }
44
49
 
45
50
  - (Clock *)addMinutes:(int)minutes {
46
- return [Clock clockWithHours: _hours minutes: _minutes + minutes];
51
+ return [Clock clockWithHours: self.hours minutes: self.minutes + minutes];
47
52
  }
48
53
 
49
54
  - (Clock *)subtractMinutes:(int)minutes {
@@ -51,7 +56,7 @@
51
56
  }
52
57
 
53
58
  - (NSString *)description {
54
- return [NSString stringWithFormat:@"%.2d:%.2d", _hours, _minutes];
59
+ return [NSString stringWithFormat:@"%.2d:%.2d", self.hours, self.minutes];
55
60
  }
56
61
 
57
62
  - (BOOL)isEqual:(id)object {
@@ -10,7 +10,7 @@
10
10
 
11
11
  @end
12
12
 
13
- @implementation ClockTest
13
+ @implementation ClockTest //!OCLint
14
14
 
15
15
  #pragma mark - Create: Test creating a new clock with an initial time.
16
16
 
@@ -8,58 +8,58 @@
8
8
 
9
9
  @interface GigasecondTest : XCTestCase
10
10
 
11
+ @property (nonatomic, strong) NSDateFormatter *dateFormatter;
12
+
11
13
  @end
12
14
 
13
- @implementation GigasecondTest {
14
- NSDateFormatter *_dateFormatter;
15
- }
15
+ @implementation GigasecondTest
16
16
 
17
17
  - (void)setUp {
18
18
  [super setUp];
19
- _dateFormatter = [[NSDateFormatter alloc] init];
20
- [_dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]];
21
- [_dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"];
19
+ self.dateFormatter = [[NSDateFormatter alloc] init];
20
+ [self.dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]];
21
+ [self.dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"];
22
22
  }
23
23
 
24
24
  - (void)test1 {
25
- NSDate *startDate = [_dateFormatter dateFromString:@"2011-04-25T00:00:00"];
25
+ NSDate *startDate = [self.dateFormatter dateFromString:@"2011-04-25T00:00:00"];
26
26
  Gigasecond *gigasecond = [[Gigasecond alloc] initWithStartDate:startDate];
27
- NSDate *expectedDate = [_dateFormatter dateFromString:@"2043-01-01T01:46:40"];
27
+ NSDate *expectedDate = [self.dateFormatter dateFromString:@"2043-01-01T01:46:40"];
28
28
  XCTAssertEqualObjects(expectedDate, [gigasecond gigasecondDate]);
29
29
  }
30
30
 
31
31
  - (void)test2 {
32
- NSDate *startDate = [_dateFormatter dateFromString:@"1977-06-13T00:00:00"];
32
+ NSDate *startDate = [self.dateFormatter dateFromString:@"1977-06-13T00:00:00"];
33
33
  Gigasecond *gigasecond = [[Gigasecond alloc] initWithStartDate:startDate];
34
- NSDate *expectedDate = [_dateFormatter dateFromString:@"2009-02-19T01:46:40"];
34
+ NSDate *expectedDate = [self.dateFormatter dateFromString:@"2009-02-19T01:46:40"];
35
35
  XCTAssertEqualObjects(expectedDate, [gigasecond gigasecondDate]);
36
36
  }
37
37
 
38
38
  - (void)test3 {
39
- NSDate *startDate = [_dateFormatter dateFromString:@"1959-07-19T00:00:00"];
39
+ NSDate *startDate = [self.dateFormatter dateFromString:@"1959-07-19T00:00:00"];
40
40
  Gigasecond *gigasecond = [[Gigasecond alloc] initWithStartDate:startDate];
41
- NSDate *expectedDate = [_dateFormatter dateFromString:@"1991-03-27T01:46:40"];
41
+ NSDate *expectedDate = [self.dateFormatter dateFromString:@"1991-03-27T01:46:40"];
42
42
  XCTAssertEqualObjects(expectedDate, [gigasecond gigasecondDate]);
43
43
  }
44
44
 
45
45
  - (void)test24HourTime {
46
- NSDate *startDate = [_dateFormatter dateFromString:@"2015-01-24T22:00:00"];
46
+ NSDate *startDate = [self.dateFormatter dateFromString:@"2015-01-24T22:00:00"];
47
47
  Gigasecond *gigasecond = [[Gigasecond alloc] initWithStartDate:startDate];
48
- NSDate *expectedDate = [_dateFormatter dateFromString:@"2046-10-02T23:46:40"];
48
+ NSDate *expectedDate = [self.dateFormatter dateFromString:@"2046-10-02T23:46:40"];
49
49
  XCTAssertEqualObjects(expectedDate, [gigasecond gigasecondDate]);
50
50
  }
51
51
 
52
52
  - (void)testTimeWithSeconds {
53
- NSDate *startDate = [_dateFormatter dateFromString:@"1959-07-19T23:59:59"];
53
+ NSDate *startDate = [self.dateFormatter dateFromString:@"1959-07-19T23:59:59"];
54
54
  Gigasecond *gigasecond = [[Gigasecond alloc] initWithStartDate:startDate];
55
- NSDate *expectedDate = [_dateFormatter dateFromString:@"1991-03-28T01:46:39"];
55
+ NSDate *expectedDate = [self.dateFormatter dateFromString:@"1991-03-28T01:46:39"];
56
56
  XCTAssertEqualObjects(expectedDate, [gigasecond gigasecondDate]);
57
57
  }
58
58
 
59
59
  - (void)testFullTimeWithDayRollOver {
60
- NSDate *startDate = [_dateFormatter dateFromString:@"2015-01-24T23:59:59"];
60
+ NSDate *startDate = [self.dateFormatter dateFromString:@"2015-01-24T23:59:59"];
61
61
  Gigasecond *gigasecond = [[Gigasecond alloc] initWithStartDate:startDate];
62
- NSDate *expectedDate = [_dateFormatter dateFromString:@"2046-10-03T01:46:39"];
62
+ NSDate *expectedDate = [self.dateFormatter dateFromString:@"2046-10-03T01:46:39"];
63
63
  XCTAssertEqualObjects(expectedDate, [gigasecond gigasecondDate]);
64
64
  }
65
65
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  @implementation HelloWorld
5
5
  - (NSString *)hello:(NSString *)name {
6
- if(!name) {
7
- name = @"World";
6
+ if (!name) {
7
+ name = @"World"; //!OCLINT
8
8
  }
9
9
  return [NSString stringWithFormat:@"Hello, %@!", name];
10
10
  }
@@ -0,0 +1,7 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ @interface Isogram : NSObject
4
+
5
+ + (BOOL)isIsogram:(NSString *)string;
6
+
7
+ @end
@@ -0,0 +1,28 @@
1
+ #import "IsogramExample.h"
2
+
3
+ @implementation Isogram
4
+
5
+ + (BOOL)isIsogram:(NSString *)string {
6
+ NSString *lowercasedString = string.lowercaseString;
7
+ NSCharacterSet *lowercaseLetterSet = [NSCharacterSet lowercaseLetterCharacterSet];
8
+
9
+ NSMutableSet<NSNumber *> *letters = [[NSMutableSet alloc] init];
10
+
11
+ for (int i = 0; i < [lowercasedString length]; i++) {
12
+ unichar character = [lowercasedString characterAtIndex:i];
13
+ if (![lowercaseLetterSet characterIsMember:character]) {
14
+ continue;
15
+ }
16
+
17
+ NSNumber *numberForCharacter = [NSNumber numberWithUnsignedShort:character];
18
+ if ([letters containsObject:numberForCharacter]) {
19
+ return NO;
20
+ }
21
+
22
+ [letters addObject:numberForCharacter];
23
+ }
24
+
25
+ return YES;
26
+ }
27
+
28
+ @end
@@ -0,0 +1,47 @@
1
+ #import <XCTest/XCTest.h>
2
+
3
+ #if __has_include("IsogramExample.h")
4
+ # import "IsogramExample.h"
5
+ # else
6
+ # import "Isogram.h"
7
+ #endif
8
+
9
+ @interface IsogramTest : XCTestCase
10
+
11
+ @end
12
+
13
+ @implementation IsogramTest
14
+
15
+ - (void)testEmptyString {
16
+ XCTAssertTrue([Isogram isIsogram:@""]);
17
+ }
18
+
19
+ - (void)testIsogramWithOnlyLowerCaseCharacters {
20
+ XCTAssertTrue([Isogram isIsogram:@"isogram"]);
21
+ }
22
+
23
+ - (void)testWordWithOneDuplicatedCharacter {
24
+ XCTAssertFalse([Isogram isIsogram:@"eleven"]);
25
+ }
26
+
27
+ - (void)testLongestReportedEnglishIsogram {
28
+ XCTAssertTrue([Isogram isIsogram:@"subdermatoglyphic"]);
29
+ }
30
+
31
+ - (void)testWordWithDuplicatedCharacterInMixedCase {
32
+ XCTAssertFalse([Isogram isIsogram:@"Alphabet"]);
33
+ }
34
+
35
+ - (void)testHypotheticalIsogrammicWordWithHyphen {
36
+ XCTAssertTrue([Isogram isIsogram:@"thumbscrew-japingly"]);
37
+ }
38
+
39
+ - (void)testIsogramWithDuplicatedNonLetterCharacter {
40
+ XCTAssertTrue([Isogram isIsogram:@"Hjelmqvist-Gryb-Zock-Pfund-Wax"]);
41
+ }
42
+
43
+ - (void)testMadeUpNameThatIsAnIsogram {
44
+ XCTAssertTrue([Isogram isIsogram:@"Emily Jung Schwartzkopf"]);
45
+ }
46
+
47
+ @end
@@ -5,7 +5,7 @@
5
5
  }
6
6
 
7
7
  - (instancetype)initWithNumberString:(NSString *)numberString {
8
- if (self = [super init]) {
8
+ if (self = [super init]) { //!OCLint
9
9
  NSMutableArray<NSNumber *> *numbers = [[NSMutableArray alloc] initWithCapacity:[numberString length]];
10
10
  NSCharacterSet *decimalSet = [NSCharacterSet decimalDigitCharacterSet];
11
11
 
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
  - (void)testCanGetTheLargestProductOfABigNumberProjectEuler {
49
- XCTAssertEqual(23514624000, [[[LargestSeriesProduct alloc] initWithNumberString:@"7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450"] largestProduct:13]);
49
+ XCTAssertEqual(23514624000, [[[LargestSeriesProduct alloc] initWithNumberString:@"7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450"] largestProduct:13]); //!OCLINT
50
50
  }
51
51
 
52
52
  - (void)testReportsZeroIfTheOnlyDigitsAreZero {
@@ -14,7 +14,7 @@
14
14
  return self;
15
15
  }
16
16
 
17
- - (NSDate *)dayForDayOfWeek:(MeetupDayOfWeek)dayOfWeek andOptions:(MeetupOptions)options {
17
+ - (NSDate *)dayForDayOfWeek:(MeetupDayOfWeek)dayOfWeek andOptions:(MeetupOptions)options { //!OCLINT
18
18
  NSDateComponents *components = [[NSDateComponents alloc] init];
19
19
  components.year = _year;
20
20
  components.month = _month;
@@ -39,8 +39,6 @@
39
39
  case MeetupOptionsTeenth:
40
40
  components.day = 13;
41
41
  break;
42
- default:
43
- break;
44
42
  }
45
43
 
46
44
  while ([self weekdayFromComponents:components] != dayOfWeek) {
@@ -13,27 +13,26 @@
13
13
  + (NSArray<NSString *> *)commandsForNumber:(int)number {
14
14
  NSMutableArray *result = [[NSMutableArray alloc] init];
15
15
 
16
- if (number & 1 << 0) {
16
+ if (number & 1 << 0) { //!OCLINT
17
17
  [result addObject:@"wink"];
18
18
  }
19
19
 
20
- if (number & 1 << 1) {
20
+ if (number & 1 << 1) { //!OCLINT
21
21
  [result addObject:@"double blink"];
22
22
  }
23
23
 
24
- if (number & 1 << 2) {
24
+ if (number & 1 << 2) { //!OCLINT
25
25
  [result addObject:@"close your eyes"];
26
26
  }
27
27
 
28
- if (number & 1 << 3) {
28
+ if (number & 1 << 3) { //!OCLINT
29
29
  [result addObject:@"jump"];
30
30
  }
31
31
 
32
- if (number & 1 << 4) {
32
+ if (number & 1 << 4) { //!OCLINT
33
33
  return [[result reverseObjectEnumerator] allObjects];
34
- } else {
35
- return result;
36
34
  }
35
+ return result;
37
36
  }
38
37
 
39
38
  @end
@@ -21,48 +21,48 @@ static const double AgeAccuracy = 0.01;
21
21
  XCTAssertEqual(1000000, age.seconds);
22
22
  }
23
23
 
24
- - (void)testAgeInEarthYears {
24
+ - (void)testAgeInEarthYears { //!OCLINT
25
25
  SpaceAge *age = [[SpaceAge alloc] initWithSeconds:1000000000];
26
26
  XCTAssertEqualWithAccuracy(31.69, age.onEarth, AgeAccuracy);
27
27
  }
28
28
 
29
- - (void)testAgeInMercuryYears {
29
+ - (void)testAgeInMercuryYears { //!OCLINT
30
30
  SpaceAge *age = [[SpaceAge alloc] initWithSeconds:2134835688];
31
31
  XCTAssertEqualWithAccuracy(67.65, age.onEarth, AgeAccuracy);
32
32
  XCTAssertEqualWithAccuracy(280.88, age.onMercury, AgeAccuracy);
33
33
  }
34
34
 
35
- - (void)testAgeInVenusYears {
35
+ - (void)testAgeInVenusYears { //!OCLINT
36
36
  SpaceAge *age = [[SpaceAge alloc] initWithSeconds:189839836];
37
37
  XCTAssertEqualWithAccuracy(6.02, age.onEarth, AgeAccuracy);
38
38
  XCTAssertEqualWithAccuracy(9.78, age.onVenus, AgeAccuracy);
39
39
  }
40
40
 
41
- - (void)testAgeOnMars {
41
+ - (void)testAgeOnMars { //!OCLINT
42
42
  SpaceAge *age = [[SpaceAge alloc] initWithSeconds:2329871239];
43
43
  XCTAssertEqualWithAccuracy(73.83, age.onEarth, AgeAccuracy);
44
44
  XCTAssertEqualWithAccuracy(39.25, age.onMars, AgeAccuracy);
45
45
  }
46
46
 
47
- - (void)testAgeOnJupiter {
47
+ - (void)testAgeOnJupiter { //!OCLINT
48
48
  SpaceAge *age = [[SpaceAge alloc] initWithSeconds:901876382];
49
49
  XCTAssertEqualWithAccuracy(28.58, age.onEarth, AgeAccuracy);
50
50
  XCTAssertEqualWithAccuracy(2.41, age.onJupiter, AgeAccuracy);
51
51
  }
52
52
 
53
- - (void)testAgeOnSaturn {
53
+ - (void)testAgeOnSaturn { //!OCLINT
54
54
  SpaceAge *age = [[SpaceAge alloc] initWithSeconds:3000000000];
55
55
  XCTAssertEqualWithAccuracy(95.06, age.onEarth, AgeAccuracy);
56
56
  XCTAssertEqualWithAccuracy(3.23, age.onSaturn, AgeAccuracy);
57
57
  }
58
58
 
59
- - (void)testAgeOnUranus {
59
+ - (void)testAgeOnUranus { //!OCLINT
60
60
  SpaceAge *age = [[SpaceAge alloc] initWithSeconds:3210123456];
61
61
  XCTAssertEqualWithAccuracy(101.72, age.onEarth, AgeAccuracy);
62
62
  XCTAssertEqualWithAccuracy(1.21, age.onUranus, AgeAccuracy);
63
63
  }
64
64
 
65
- - (void)testAgeOnNeptune {
65
+ - (void)testAgeOnNeptune { //!OCLINT
66
66
  SpaceAge *age = [[SpaceAge alloc] initWithSeconds:8210123456];
67
67
  XCTAssertEqualWithAccuracy(260.16, age.onEarth, AgeAccuracy);
68
68
  XCTAssertEqualWithAccuracy(1.58, age.onNeptune, AgeAccuracy);
@@ -10,7 +10,7 @@
10
10
  continue;
11
11
  }
12
12
 
13
- int x = 1;
13
+ int x = 1; //!OCLint
14
14
 
15
15
  while (x * [multiple intValue] < [limit intValue]) {
16
16
  [multiplesFound addObject:@(x * [multiple intValue])];
@@ -70,7 +70,7 @@
70
70
  XCTAssertEqualObjects([Transpose transpose:input], expected);
71
71
  }
72
72
 
73
- - (void)testManyLines {
73
+ - (void)testManyLines { //!OCLINT
74
74
  NSArray<NSString *> *input = @[@"Chor. Two households, both alike in dignity,",
75
75
  @"In fair Verona, where we lay our scene,",
76
76
  @"From ancient grudge break to new mutiny,",
@@ -2,7 +2,7 @@
2
2
 
3
3
  @implementation Triangle
4
4
 
5
- + (TriangleKind)kindForSides:(double)a :(double)b :(double)c {
5
+ + (TriangleKind)kindForSides:(double)a :(double)b :(double)c { //!OCLINT
6
6
  if (a <= 0 || b <= 0 || c <= 0) {
7
7
  @throw [NSException exceptionWithName:@"Invalid triangle" reason:@"All lengths must be positive" userInfo:nil];
8
8
  } else if (a + b <= c || b + c <= a || a + c <= b) {
@@ -13,7 +13,7 @@
13
13
  return TriangleKindEquilateral;
14
14
  } else if (a == b || b == c || a == c) {
15
15
  return TriangleKindIsosceles;
16
- } else {
16
+ } else { //!OCLINT
17
17
  return TriangleKindScalene;
18
18
  }
19
19
  }
@@ -79,6 +79,8 @@
79
79
  E9C1C02B1D9DB1830015E86E /* AcronymTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E9C1C02A1D9DB1830015E86E /* AcronymTest.m */; };
80
80
  E9C1C02F1D9EC1130015E86E /* RunLengthEncodingExample.m in Sources */ = {isa = PBXBuildFile; fileRef = E9C1C02E1D9EC1130015E86E /* RunLengthEncodingExample.m */; };
81
81
  E9C1C0311D9EC1270015E86E /* RunLengthEncodingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E9C1C0301D9EC1270015E86E /* RunLengthEncodingTest.m */; };
82
+ E9F390071DFCA337005C5F46 /* IsogramExample.m in Sources */ = {isa = PBXBuildFile; fileRef = E9F390061DFCA337005C5F46 /* IsogramExample.m */; };
83
+ E9F390091DFCA350005C5F46 /* IsogramTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E9F390081DFCA350005C5F46 /* IsogramTest.m */; };
82
84
  E9FDCA191D5407D2004EE8DB /* RomanNumeralsExample.m in Sources */ = {isa = PBXBuildFile; fileRef = E9FDCA181D5407D2004EE8DB /* RomanNumeralsExample.m */; };
83
85
  E9FDCA1B1D540801004EE8DB /* RomanNumeralsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E9FDCA1A1D540801004EE8DB /* RomanNumeralsTest.m */; };
84
86
  /* End PBXBuildFile section */
@@ -173,6 +175,9 @@
173
175
  E9C1C02D1D9EC1130015E86E /* RunLengthEncodingExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RunLengthEncodingExample.h; path = "../../exercises/run-length-encoding/RunLengthEncodingExample.h"; sourceTree = "<group>"; };
174
176
  E9C1C02E1D9EC1130015E86E /* RunLengthEncodingExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RunLengthEncodingExample.m; path = "../../exercises/run-length-encoding/RunLengthEncodingExample.m"; sourceTree = "<group>"; };
175
177
  E9C1C0301D9EC1270015E86E /* RunLengthEncodingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RunLengthEncodingTest.m; path = "../../exercises/run-length-encoding/RunLengthEncodingTest.m"; sourceTree = "<group>"; };
178
+ E9F390051DFCA337005C5F46 /* IsogramExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IsogramExample.h; path = ../../exercises/isogram/IsogramExample.h; sourceTree = "<group>"; };
179
+ E9F390061DFCA337005C5F46 /* IsogramExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IsogramExample.m; path = ../../exercises/isogram/IsogramExample.m; sourceTree = "<group>"; };
180
+ E9F390081DFCA350005C5F46 /* IsogramTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IsogramTest.m; path = ../../exercises/isogram/IsogramTest.m; sourceTree = "<group>"; };
176
181
  E9FDCA171D5407D2004EE8DB /* RomanNumeralsExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RomanNumeralsExample.h; path = "../../exercises/roman-numerals/RomanNumeralsExample.h"; sourceTree = "<group>"; };
177
182
  E9FDCA181D5407D2004EE8DB /* RomanNumeralsExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RomanNumeralsExample.m; path = "../../exercises/roman-numerals/RomanNumeralsExample.m"; sourceTree = "<group>"; };
178
183
  E9FDCA1A1D540801004EE8DB /* RomanNumeralsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RomanNumeralsTest.m; path = "../../exercises/roman-numerals/RomanNumeralsTest.m"; sourceTree = "<group>"; };
@@ -204,6 +209,7 @@
204
209
  E9E8B6EE1D519DFE0012F12C /* GradeSchool */,
205
210
  E9E8B6EF1D519E040012F12C /* Hamming */,
206
211
  E9E8B6F01D519E0B0012F12C /* HelloWorld */,
212
+ E9F390041DFCA307005C5F46 /* Isogram */,
207
213
  E9A7B2F41DA5ABA3009056B6 /* LargestSeriesProduct */,
208
214
  E9E8B6F11D519E120012F12C /* Leap */,
209
215
  E92FCC0A1D78F2AA00061017 /* Meetup */,
@@ -533,6 +539,16 @@
533
539
  name = WordCount;
534
540
  sourceTree = "<group>";
535
541
  };
542
+ E9F390041DFCA307005C5F46 /* Isogram */ = {
543
+ isa = PBXGroup;
544
+ children = (
545
+ E9F390051DFCA337005C5F46 /* IsogramExample.h */,
546
+ E9F390061DFCA337005C5F46 /* IsogramExample.m */,
547
+ E9F390081DFCA350005C5F46 /* IsogramTest.m */,
548
+ );
549
+ name = Isogram;
550
+ sourceTree = "<group>";
551
+ };
536
552
  E9FDCA161D540793004EE8DB /* RomanNumerals */ = {
537
553
  isa = PBXGroup;
538
554
  children = (
@@ -648,6 +664,7 @@
648
664
  E907D0CA1D6B731600106C42 /* GigasecondExample.m in Sources */,
649
665
  E9381D521D8F2DCC003F22A1 /* ClockExample.m in Sources */,
650
666
  E99D1D811D5533BF0006A303 /* SumOfMultiplesExample.m in Sources */,
667
+ E9F390071DFCA337005C5F46 /* IsogramExample.m in Sources */,
651
668
  E9C1C02F1D9EC1130015E86E /* RunLengthEncodingExample.m in Sources */,
652
669
  E92FCC0F1D78F3B600061017 /* MeetupTest.m in Sources */,
653
670
  E9381D4E1D8F2982003F22A1 /* RaindropsTest.m in Sources */,
@@ -664,6 +681,7 @@
664
681
  1EFACAA91CCCAF3D006F2E69 /* GradeSchoolExample.m in Sources */,
665
682
  1EFACABA1CCCAF3D006F2E69 /* SpaceAgeTest.m in Sources */,
666
683
  1EFACAB91CCCAF3D006F2E69 /* SpaceAgeExample.m in Sources */,
684
+ E9F390091DFCA350005C5F46 /* IsogramTest.m in Sources */,
667
685
  E951B6B71D4294E6009EB5B6 /* AllergiesExample.m in Sources */,
668
686
  E9FDCA1B1D540801004EE8DB /* RomanNumeralsTest.m in Sources */,
669
687
  E9C1C0231D9D993E0015E86E /* SecretHandshakeExample.m in Sources */,
@@ -1,10 +1,6 @@
1
1
  ---
2
2
  sudo: false
3
3
  language: perl6
4
- perl6:
5
- - latest
6
- - '2016.10'
7
- - '2016.07'
8
4
  install:
9
5
  - rakudobrew build-panda
10
6
  - panda install JSON::Tiny
@@ -11,8 +11,8 @@ class Phone {
11
11
  method new (:$number!) {
12
12
  my $validated = $number;
13
13
  $validated ~~ s:g/<:!Decimal_Number>//;
14
- $validated ~~ /^ 1? (\d ** 10) $/ ?? ($validated = ~$0) !! X::Phone::Invalid.new(:payload«$number»).throw;
15
- self.bless(:number«$validated»);
14
+ $validated ~~ /^ 1? (\d ** 10) $/ ?? ($validated = ~$0) !! X::Phone::Invalid.new(payload => $number).throw;
15
+ self.bless(number => $validated);
16
16
  }
17
17
 
18
18
  method area-code {
@@ -7,13 +7,6 @@ use lib my $path = IO::Path.new($?FILE).parent.path;
7
7
  BEGIN {
8
8
  plan 12;
9
9
  use-ok %*ENV<EXERCISM> ?? 'Example' !! 'Phone', 'Module loaded';
10
-
11
- unless $*PERL.compiler.version ~~ v2016.10+ {
12
- sub bail-out {};
13
- note 'Perl 6 ' ~ $*PERL.compiler.version ~ ' is not supported. Please use v2016.10 or newer';
14
- skip-rest;
15
- exit;
16
- }
17
10
  }
18
11
 
19
12
  my %tests = from-json open("$path/cases.json").slurp-rest;
@@ -23,7 +16,7 @@ subtest 'number, area-code and pretty methods', {
23
16
  ok Phone.can('number'), 'can Phone.number';
24
17
  ok Phone.can('area-code'), 'can Phone.area-code';
25
18
  ok Phone.can('pretty'), 'can Phone.pretty';
26
- } or bail-out 'Missing method(s).';
19
+ } or fail 'Missing method(s).';
27
20
 
28
21
  for @(%tests<valid>) {
29
22
  my $phone = Phone.new(number => .<input>);
@@ -24,7 +24,8 @@
24
24
  "slug": "sum-of-multiples",
25
25
  "difficulty": 1,
26
26
  "topics": [
27
- "Filtering"
27
+ "Filtering",
28
+ "Sets"
28
29
  ]
29
30
  },
30
31
  {
@@ -1,5 +1,5 @@
1
1
  object SumOfMultiples {
2
- def sumOfMultiples(factors: List[Int], limit: Int): Int = {
2
+ def sumOfMultiples(factors: Set[Int], limit: Int): Int = {
3
3
  def isDivisibleBy(x: Int)(y: Int): Boolean = x % y == 0
4
4
  def isMultiple(x: Int): Boolean = factors exists isDivisibleBy(x)
5
5
 
@@ -0,0 +1,4 @@
1
+ object SumOfMultiples {
2
+ def sumOfMultiples(factors: Set[Int], limit: Int): Int = ???
3
+ }
4
+
@@ -2,61 +2,61 @@ import org.scalatest.{FunSuite, Matchers}
2
2
 
3
3
  class SumOfMultiplesTest extends FunSuite with Matchers {
4
4
  test("[3, 5] 1") {
5
- SumOfMultiples.sumOfMultiples(List(3, 5), 1) should be (0)
5
+ SumOfMultiples.sumOfMultiples(Set(3, 5), 1) should be (0)
6
6
  }
7
7
 
8
8
  test("[3, 5] 4") {
9
9
  pending
10
- SumOfMultiples.sumOfMultiples(List(3, 5), 4) should be (3)
10
+ SumOfMultiples.sumOfMultiples(Set(3, 5), 4) should be (3)
11
11
  }
12
12
 
13
13
  test("[3, 5] 10") {
14
14
  pending
15
- SumOfMultiples.sumOfMultiples(List(3, 5), 10) should be (23)
15
+ SumOfMultiples.sumOfMultiples(Set(3, 5), 10) should be (23)
16
16
  }
17
17
 
18
18
  test("[3, 5] 100") {
19
19
  pending
20
- SumOfMultiples.sumOfMultiples(List(3, 5), 100) should be (2318)
20
+ SumOfMultiples.sumOfMultiples(Set(3, 5), 100) should be (2318)
21
21
  }
22
22
 
23
23
  test("[3, 5] 1000") {
24
24
  pending
25
- SumOfMultiples.sumOfMultiples(List(3, 5), 1000) should be (233168)
25
+ SumOfMultiples.sumOfMultiples(Set(3, 5), 1000) should be (233168)
26
26
  }
27
27
 
28
28
  test("[7, 13, 17] 20") {
29
29
  pending
30
- SumOfMultiples.sumOfMultiples(List(7, 13, 17), 20) should be (51)
30
+ SumOfMultiples.sumOfMultiples(Set(7, 13, 17), 20) should be (51)
31
31
  }
32
32
 
33
33
  test("[4, 6] 15") {
34
34
  pending
35
- SumOfMultiples.sumOfMultiples(List(4, 6), 15) should be (30)
35
+ SumOfMultiples.sumOfMultiples(Set(4, 6), 15) should be (30)
36
36
  }
37
37
 
38
38
  test("[5, 6, 8] 150") {
39
39
  pending
40
- SumOfMultiples.sumOfMultiples(List(5, 6, 8), 150) should be (4419)
40
+ SumOfMultiples.sumOfMultiples(Set(5, 6, 8), 150) should be (4419)
41
41
  }
42
42
 
43
43
  test("[5, 25] 51") {
44
44
  pending
45
- SumOfMultiples.sumOfMultiples(List(5, 25), 51) should be (275)
45
+ SumOfMultiples.sumOfMultiples(Set(5, 25), 51) should be (275)
46
46
  }
47
47
 
48
48
  test("[43, 47] 10000") {
49
49
  pending
50
- SumOfMultiples.sumOfMultiples(List(43, 47), 10000) should be (2203160)
50
+ SumOfMultiples.sumOfMultiples(Set(43, 47), 10000) should be (2203160)
51
51
  }
52
52
 
53
53
  test("[1] 100") {
54
54
  pending
55
- SumOfMultiples.sumOfMultiples(List(1), 100) should be (4950)
55
+ SumOfMultiples.sumOfMultiples(Set(1), 100) should be (4950)
56
56
  }
57
57
 
58
58
  test("[] 10000") {
59
59
  pending
60
- SumOfMultiples.sumOfMultiples(List(), 10000) should be (0)
60
+ SumOfMultiples.sumOfMultiples(Set(), 10000) should be (0)
61
61
  }
62
62
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3.7
4
+ version: 2.0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-10 00:00:00.000000000 Z
11
+ date: 2016-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -2443,6 +2443,7 @@ files:
2443
2443
  - tracks/fsharp/exercises/diamond/Example.fs
2444
2444
  - tracks/fsharp/exercises/difference-of-squares/DifferenceOfSquaresTest.fs
2445
2445
  - tracks/fsharp/exercises/difference-of-squares/Example.fs
2446
+ - tracks/fsharp/exercises/difference-of-squares/HINTS.md
2446
2447
  - tracks/fsharp/exercises/diffie-hellman/DiffieHellmanTest.fs
2447
2448
  - tracks/fsharp/exercises/diffie-hellman/Example.fs
2448
2449
  - tracks/fsharp/exercises/dominoes/DominoesTest.fs
@@ -2466,6 +2467,7 @@ files:
2466
2467
  - tracks/fsharp/exercises/grade-school/GradeSchoolTest.fs
2467
2468
  - tracks/fsharp/exercises/grains/Example.fs
2468
2469
  - tracks/fsharp/exercises/grains/GrainsTest.fs
2470
+ - tracks/fsharp/exercises/grains/HINTS.md
2469
2471
  - tracks/fsharp/exercises/grep/Example.fs
2470
2472
  - tracks/fsharp/exercises/grep/GrepTest.fs
2471
2473
  - tracks/fsharp/exercises/hamming/Example.fs
@@ -2473,6 +2475,7 @@ files:
2473
2475
  - tracks/fsharp/exercises/hangman/Example.fs
2474
2476
  - tracks/fsharp/exercises/hangman/HangmanTest.fs
2475
2477
  - tracks/fsharp/exercises/hello-world/Example.fs
2478
+ - tracks/fsharp/exercises/hello-world/HINTS.md
2476
2479
  - tracks/fsharp/exercises/hello-world/HelloWorldTest.fs
2477
2480
  - tracks/fsharp/exercises/house/Example.fs
2478
2481
  - tracks/fsharp/exercises/house/HouseTest.fs
@@ -2546,6 +2549,7 @@ files:
2546
2549
  - tracks/fsharp/exercises/rectangles/Example.fs
2547
2550
  - tracks/fsharp/exercises/rectangles/RectanglesTest.fs
2548
2551
  - tracks/fsharp/exercises/rna-transcription/Example.fs
2552
+ - tracks/fsharp/exercises/rna-transcription/HINTS.md
2549
2553
  - tracks/fsharp/exercises/rna-transcription/RNATranscriptionTest.fs
2550
2554
  - tracks/fsharp/exercises/robot-name/Example.fs
2551
2555
  - tracks/fsharp/exercises/robot-name/RobotNameTest.fs
@@ -4712,6 +4716,9 @@ files:
4712
4716
  - tracks/objective-c/exercises/hello-world/HelloWorldExample.h
4713
4717
  - tracks/objective-c/exercises/hello-world/HelloWorldExample.m
4714
4718
  - tracks/objective-c/exercises/hello-world/HelloWorldTest.m
4719
+ - tracks/objective-c/exercises/isogram/IsogramExample.h
4720
+ - tracks/objective-c/exercises/isogram/IsogramExample.m
4721
+ - tracks/objective-c/exercises/isogram/IsogramTest.m
4715
4722
  - tracks/objective-c/exercises/largest-series-product/LargestSeriesProductExample.h
4716
4723
  - tracks/objective-c/exercises/largest-series-product/LargestSeriesProductExample.m
4717
4724
  - tracks/objective-c/exercises/largest-series-product/LargestSeriesProductTest.m
@@ -4771,7 +4778,6 @@ files:
4771
4778
  - tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.xcworkspace/contents.xcworkspacedata
4772
4779
  - tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme
4773
4780
  - tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/xobjectivecTest.xcscheme
4774
- - tracks/objective-c/xcodeProject/compile_commands.json
4775
4781
  - tracks/objective-c/xcodeProject/xobjectivecTest/Info.plist
4776
4782
  - tracks/ocaml/.git
4777
4783
  - tracks/ocaml/.gitignore
@@ -6603,6 +6609,7 @@ files:
6603
6609
  - tracks/scala/exercises/sum-of-multiples/build.sbt
6604
6610
  - tracks/scala/exercises/sum-of-multiples/example.scala
6605
6611
  - tracks/scala/exercises/sum-of-multiples/src/main/scala/.keep
6612
+ - tracks/scala/exercises/sum-of-multiples/src/main/scala/SumOfMultiples.scala
6606
6613
  - tracks/scala/exercises/sum-of-multiples/src/test/scala/SumOfMultiplesTest.scala
6607
6614
  - tracks/scala/exercises/triangle/build.sbt
6608
6615
  - tracks/scala/exercises/triangle/example.scala