Skip to content

Commit

Permalink
Updates aliases.
Browse files Browse the repository at this point in the history
  • Loading branch information
sloik committed Dec 11, 2023
1 parent 9dfa9d7 commit 98dbd26
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 deletions.
17 changes: 13 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/sloik/AliasWonderland.git",
"state" : {
"revision" : "4bb5cccd0ea96a4ce5d228e501108bd7ecb38dcb",
"version" : "2.0.1"
"revision" : "46f7667556438502bbc1f7bcf05aae03f1ee4e98",
"version" : "4.0.0"
}
},
{
Expand All @@ -23,8 +23,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing.git",
"state" : {
"revision" : "f29e2014f6230cf7d5138fc899da51c7f513d467",
"version" : "1.10.0"
"revision" : "59b663f68e69f27a87b45de48cb63264b8194605",
"version" : "1.15.1"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"state" : {
"revision" : "6ad4ea24b01559dde0773e3d091f1b9e36175036",
"version" : "509.0.2"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let package = Package(

.package(
url: "https://github.com/sloik/AliasWonderland.git",
from: "3.6.3"
from: "4.0.0"
),

.package(
Expand Down
6 changes: 3 additions & 3 deletions Sources/Zippy/ZipAsync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public func asyncZip<A,B,C,D>(
public func asyncZip<A,B,C>(
_ f: @autoclosure AsyncProducer<A>,
_ g: @autoclosure AsyncProducer<B>,
with transform: @escaping Closure2I<A,B,C>
with transform: @escaping Closure<A,B,C>
) async -> C {
let (a,b): (A,B) = await asyncZip( await f() , await g() )
return transform(a, b)
Expand All @@ -62,7 +62,7 @@ public func asyncZip<A,B,C,D>(
_ f: @autoclosure AsyncProducer<A>,
_ g: @autoclosure AsyncProducer<B>,
_ h: @autoclosure AsyncProducer<C>,
with transform: @escaping Closure3I<A,B,C,D>
with transform: @escaping Closure<A,B,C,D>
) async -> D {
let (a,b,c): (A,B,C) = await asyncZip( await f() , await g(), await h() )
return transform(a, b, c)
Expand All @@ -74,7 +74,7 @@ public func asyncZip<A,B,C,D,E>(
_ g: @autoclosure AsyncProducer<B>,
_ h: @autoclosure AsyncProducer<C>,
_ i: @autoclosure AsyncProducer<D>,
with transform: @escaping Closure4I<A,B,C,D,E>
with transform: @escaping Closure<A,B,C,D,E>
) async -> E {
let (a,b,c, d): (A,B,C,D) = await asyncZip( await f() , await g(), await h(), await i() )
return transform(a, b, c, d)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Zippy/ZipEither.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public func zip<A,B,L>(
// MARK: - Zip With

public func zip<A,B,Output, Left>(
with f: @escaping Closure2I<A,B,Output>
with f: @escaping Closure<A,B,Output>
)
-> (Either<Left,A>, Either<Left,B>)
-> Either<[Left],Output> {
Expand Down
8 changes: 4 additions & 4 deletions Sources/Zippy/ZipOptional.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public func zip<A, B>(
}

@discardableResult
public func zipWith<A,B,C>(_ f: @escaping Closure2I<A,B,C>) -> Closure2I<A?,B?,C?> {
public func zipWith<A,B,C>(_ f: @escaping Closure<A,B,C>) -> Closure<A?,B?,C?> {
return { a, b in
zip(a,b).map( f )
}
Expand All @@ -39,7 +39,7 @@ public func zip<A, B, C>(
}

@discardableResult
public func zipWith<A,B,C,D>(_ f: @escaping Closure3I<A,B,C,D>) -> Closure3I<A?,B?,C?,D?> {
public func zipWith<A,B,C,D>(_ f: @escaping Closure<A,B,C,D>) -> Closure<A?,B?,C?,D?> {
return { a, b, c in
zip(a,b,c).map( f )
}
Expand All @@ -60,7 +60,7 @@ public func zip<A, B, C, D>(
}

@discardableResult
public func zipWith<A,B,C,D,E>(_ f: @escaping Closure4I<A,B,C,D,E>) -> Closure4I<A?,B?,C?,D?,E?> {
public func zipWith<A,B,C,D,E>(_ f: @escaping Closure<A,B,C,D,E>) -> Closure<A?,B?,C?,D?,E?> {
return { a, b, c, d in
zip(a,b,c, d).map( f )
}
Expand All @@ -82,7 +82,7 @@ public func zip<A, B, C, D, E>(
}

@discardableResult
public func zipWith<A,B,C,D,E,F>(_ f: @escaping Closure5I<A,B,C,D,E,F>) -> Closure5I<A?,B?,C?,D?,E?,F?> {
public func zipWith<A,B,C,D,E,F>(_ f: @escaping Closure<A,B,C,D,E,F>) -> Closure<A?,B?,C?,D?,E?,F?> {
return { a, b, c, d, e in
zip(a,b,c,d,e).map( f )
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/ZippyTests/ZipEitherTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class ZipEitherTests: XCTestCase {
func test_zipWith() {

do {
let sut: Closure2I< Either<String,Int>, Either<String,Int>, Either<[String],Z2>> = zip(with: Z2.init)
let sut: Closure< Either<String,Int>, Either<String,Int>, Either<[String],Z2>> = zip(with: Z2.init)

let result: Either<[String], Z2> = sut( eitherRightStringInt, .right(52) )

Expand Down

0 comments on commit 98dbd26

Please sign in to comment.