 			disposable += otherSignal.observe { event in
 				switch event {
 				case let .Next(value):
-					states.modify { states in
-						var states = states
-						states.1.values.append(value)
-						return states
+					state.modify { state in
+						var state = state
+						state.values.right.append(value)
+						return state
 					}
 					
 					flush()
 				case let .Failed(error):
 					onFailed(error)
 				case .Completed:
-					states.modify { states in
-						var states = states
-						states.1.completed = true
-						return states
+					state.modify { state in
+						var state = state
+						state.completed.right = true
+						return state
 					}
 					
 					flush()

	@warn_unused_result(message="Did you forget to call `observe` on the signal?")
	public func zipWith<U>(otherSignal: Signal<U, Error>) -> Signal<(Value, U), Error> {
		return Signal { observer in
			let states = Atomic(ZipState<Value>(), ZipState<U>())
			let disposable = CompositeDisposable()
			
			let flush = {
				var tuple: (Value, U)?
				var isFinished = false
				states.modify { states in
					var (left, right) = states
					guard !left.values.isEmpty && !right.values.isEmpty else {
						return states
					}

					tuple = (left.values.removeFirst(), right.values.removeFirst())
					isFinished = left.isFinished || right.isFinished

					return (left, right)
				}

				if let tuple = tuple {

	}
}

private struct ZipState<Left, Right> {
	var values: (left: [Left], right: [Right]) = ([], [])
	var completed: (left: Bool, right: Bool) = (false, false)

	var isFinished: Bool {
		return (completed.left && values.left.isEmpty) || (completed.right && values.right.isEmpty)
	}
}

