Skip to content

Commit

Permalink
Fixing lint warning and fix for publish to cocoapods
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurp committed Sep 16, 2016
1 parent 79707a3 commit 6defd3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0
6 changes: 3 additions & 3 deletions Sources/Dollar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1238,11 +1238,11 @@ open class $ {
/// - parameter matrix: Generic matrix containing any type.
/// - returns: A transposed version of input matrix.
open class func transpose<T>(_ matrix: [[T]]) -> [[T]] {
guard matrix.filter({ return $0.count == matrix[0].count }).count == matrix.count,
var returnMatrix: [[T?]] = Array(repeating: Array(repeating: nil, count: matrix.count),
count: matrix.first!.count) else {
guard matrix.filter({ return $0.count == matrix[0].count }).count == matrix.count else {
return matrix
}
var returnMatrix: [[T?]] = Array(repeating: Array(repeating: nil, count: matrix.count),
count: matrix.first!.count)
for (rowNumber, row) in matrix.enumerated() {
for (index, item) in row.enumerated() {
returnMatrix[index][rowNumber] = item
Expand Down

0 comments on commit 6defd3e

Please sign in to comment.