 			let flush = {
 				var tuple: (Value, U)?
 				var isFinished = false
+
 				state.modify { state in
-					var state = state
+					defer { isFinished = state.isFinished }
 					guard !state.values.left.isEmpty && !state.values.right.isEmpty else {
 						return state
 					}
 
+					var state = state
 					tuple = (state.values.left.removeFirst(), state.values.right.removeFirst())
-					isFinished = state.isFinished
-
 					return state
 				}
 

				case .Completed:
					state.modify { state in
						var state = state
						state.completed.right = true
						return state
					}
					


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

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

