Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Transpose exercise #209

Merged
merged 1 commit into from
Dec 5, 2016
Merged

Add Transpose exercise #209

merged 1 commit into from
Dec 5, 2016

Conversation

robtimp
Copy link
Contributor

@robtimp robtimp commented Dec 5, 2016

  • Add Transpose exercise

In contrast with the Ruby version, the Swift version operates on arrays of Strings, since the syntax for multi-line strings is rather cumbersome.

@robtimp
Copy link
Contributor Author

robtimp commented Dec 5, 2016

@masters3d

@pacman-bot
Copy link

48 Messages
📖
 Executed 745 tests, with 0 failures (0 unexpected) in 10.627 (11.577) seconds
📖 exercises/accumulate/AccumulateTest.swift#L19 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/accumulate/AccumulateTest.swift#L19 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/binary/BinaryExample.swift#L11 - Computed read-only properties should avoid using the get keyword.
📖 exercises/crypto-square/CryptoSquareExample.swift#L72 - Computed read-only properties should avoid using the get keyword.
📖 exercises/leap/LeapExample.swift#L7 - Computed read-only properties should avoid using the get keyword.
📖 exercises/pascals-triangle/PascalsTriangleTest.swift#L6 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/pascals-triangle/PascalsTriangleTest.swift#L6 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/poker/PokerTest.swift#L61 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L70 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L79 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L88 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L98 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L108 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L118 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L128 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L138 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L148 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L158 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L168 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L178 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L188 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L198 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L208 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L218 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L233 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L236 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/poker/PokerTest.swift#L280 - Trailing commas in arrays and dictionaries should be avoided/enforced.
📖 exercises/saddle-points/SaddlePointsTest.swift#L6 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/saddle-points/SaddlePointsTest.swift#L6 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/scrabble-score/ScrabbleScoreExample.swift#L25 - Computed read-only properties should avoid using the get keyword.
📖 exercises/series/SeriesTest.swift#L6 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/series/SeriesTest.swift#L6 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/simple-linked-list/SimpleLinkedListExample.swift#L23 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/simple-linked-list/SimpleLinkedListExample.swift#L26 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/space-age/SpaceAgeExample.swift#L7 - Computed read-only properties should avoid using the get keyword.
📖 exercises/space-age/SpaceAgeExample.swift#L8 - Computed read-only properties should avoid using the get keyword.
📖 exercises/space-age/SpaceAgeExample.swift#L9 - Computed read-only properties should avoid using the get keyword.
📖 exercises/space-age/SpaceAgeExample.swift#L10 - Computed read-only properties should avoid using the get keyword.
📖 exercises/space-age/SpaceAgeExample.swift#L11 - Computed read-only properties should avoid using the get keyword.
📖 exercises/space-age/SpaceAgeExample.swift#L12 - Computed read-only properties should avoid using the get keyword.
📖 exercises/space-age/SpaceAgeExample.swift#L13 - Computed read-only properties should avoid using the get keyword.
📖 exercises/space-age/SpaceAgeExample.swift#L14 - Computed read-only properties should avoid using the get keyword.
📖 exercises/strain/StrainTest.swift#L6 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/strain/StrainTest.swift#L6 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/tournament/TournamentExample.swift#L66 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array
📖 exercises/triangle/TriangleExample.swift#L8 - Computed read-only properties should avoid using the get keyword.
📖 exercises/wordy/WordyExample.swift#L32 - Shorthand syntactic sugar should be used, i.e. [Int] instead of Array

Generated by 🚫 danger

@masters3d masters3d merged commit ad3dd8d into exercism:master Dec 5, 2016
@masters3d
Copy link
Contributor

Nice!

}
}

return result.map { stripTrailingWhitespace($0) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great use of map! I just wanted to point out that map can also take a function as a parameter. Instead of the trailing closure which is explicitly calling the function you could instead write.

return result.map(stripTrailingWhitespace)

Which is a little cleaner.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call. That would be an awesome rule to add to Swiftlint. You should suggest it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants