/** * Returns the specified stream if the given condition is satisfied, otherwise * returns an empty stream. * * @tsplus static effect/core/stream/Stream.Ops when */ export function when(b: LazyArg, stream: Stream): Stream { return Stream.whenEffect(Effect.sync(b), stream) }