Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

Commit

Permalink
fix merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JensRavens committed Sep 26, 2016
1 parent 9311405 commit d86a494
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Observable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ extension Observable {
return observable
}

public func merge<U>(merge: Observable<U>) -> Observable<(T,U)> {
public func merge<U>(_ merge: Observable<U>) -> Observable<(T,U)> {
let signal = Observable<(T,U)>()
self.subscribe { a in
if let b = merge.peek() {
if let b = merge.value {
signal.update((a,b))
}
}
merge.subscribe { b in
if let a = self.peek() {
if let a = self.value {
signal.update((a,b))
}
}
Expand Down

0 comments on commit d86a494

Please sign in to comment.