/** * Composes this stream with the specified stream to create a cartesian * product of elements with a specified function. The `that` stream would be * run multiple times, for every element in the `this` stream. * * See also `Stream.zip` for the more common point-wise variant. * * @tsplus static effect/core/stream/Stream.Aspects crossWith * @tsplus pipeable effect/core/stream/Stream crossWith */ export function crossWith(that: Stream, f: (a: A, b: B) => C) { return (self: Stream): Stream => self.flatMap((a) => that.map((b) => f(a, b))) }