in src/main/scala/com/twitter/stitch/Stitch.scala [579:616]
def join[A, B, C, D, E, F](
a: Stitch[A],
b: Stitch[B],
c: Stitch[C],
d: Stitch[D],
e: Stitch[E],
f: Stitch[F]
): Stitch[(A, B, C, D, E, F)] =
joinMap(a, b, c, d, e, f)(tuple6).asInstanceOf[Stitch[(A, B, C, D, E, F)]]
def joinMap[A, B, C, D, E, F, Z](
a: Stitch[A],
b: Stitch[B],
c: Stitch[C],
d: Stitch[D],
e: Stitch[E],
f: Stitch[F]
)(
z: (A, B, C, D, E, F) => Z
): Stitch[Z] = {
val buf = new ArrayBuffer[Stitch[Any]](6)
buf += a
buf += b
buf += c
buf += d
buf += e
buf += f
collectNoCopy(buf).map { ss =>
z(
ss(0).asInstanceOf[A],
ss(1).asInstanceOf[B],
ss(2).asInstanceOf[C],
ss(3).asInstanceOf[D],
ss(4).asInstanceOf[E],
ss(5).asInstanceOf[F]
)
}
}