Skip to content

Commit

Permalink
Swift 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dileping committed Mar 29, 2017
1 parent 2e3123f commit 9181dde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ playground.xcworkspace
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
Packages/
Package.pins
.build/

# CocoaPods
Expand Down
10 changes: 5 additions & 5 deletions Sources/Swirl/Query.swift
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public extension QueryLike {
}
}

public extension QueryLike where Ret : Tuple1RepProtocol {
public extension QueryLike where Ret : Tuple1RepProtocol, Ret.Tuple == Tuple1<Ret.A> {
public func map<BRet : Rep>(_ f:(Ret.A)->BRet) -> QueryImpl<DS, BRet> {
return _map { ret in
ret.wrapped |> f
Expand Down Expand Up @@ -222,7 +222,7 @@ public extension QueryLike where Ret : Tuple1RepProtocol {
}
}

public extension QueryLike where Ret : Tuple2RepProtocol {
public extension QueryLike where Ret : Tuple2RepProtocol, Ret.Tuple == Tuple2<Ret.A, Ret.B> {
public func map<BRet : Rep>(_ f:(Ret.A, Ret.B)->BRet) -> QueryImpl<DS, BRet> {
return _map { ret in
ret.wrapped |> f
Expand Down Expand Up @@ -260,7 +260,7 @@ public extension QueryLike where Ret : Tuple2RepProtocol {
}
}

public extension QueryLike where Ret : Tuple3RepProtocol {
public extension QueryLike where Ret : Tuple3RepProtocol, Ret.Tuple == Tuple3<Ret.A, Ret.B, Ret.C> {
public func map<BRet : Rep>(_ f:(Ret.A, Ret.B, Ret.C)->BRet) -> QueryImpl<DS, BRet> {
return _map { ret in
ret.wrapped |> f
Expand Down Expand Up @@ -298,7 +298,7 @@ public extension QueryLike where Ret : Tuple3RepProtocol {
}
}

public extension QueryLike where Ret : Tuple4RepProtocol {
public extension QueryLike where Ret : Tuple4RepProtocol, Ret.Tuple == Tuple4<Ret.A, Ret.B, Ret.C, Ret.D> {
public func map<BRet : Rep>(_ f:(Ret.A, Ret.B, Ret.C, Ret.D)->BRet) -> QueryImpl<DS, BRet> {
return _map { ret in
ret.wrapped |> f
Expand Down Expand Up @@ -336,7 +336,7 @@ public extension QueryLike where Ret : Tuple4RepProtocol {
}
}

public extension QueryLike where Ret : Tuple5RepProtocol {
public extension QueryLike where Ret : Tuple5RepProtocol, Ret.Tuple == Tuple5<Ret.A, Ret.B, Ret.C, Ret.D, Ret.E> {
public func map<BRet : Rep>(_ f:(Ret.A, Ret.B, Ret.C, Ret.D, Ret.E)->BRet) -> QueryImpl<DS, BRet> {
return _map { ret in
ret.wrapped |> f
Expand Down

0 comments on commit 9181dde

Please sign in to comment.