(
self: Stream<A, E, R>,
f: (
pull: Pull.Pull<Arr.NonEmptyReadonlyArray<A>, E, void, R>,
scope: Scope.Scope,
forkedScope: Scope.Scope
) => Effect.Effect<
Pull.Pull<Arr.NonEmptyReadonlyArray<B>, E2, void, R2>,
EX,
RX
>
)
| 620 | * @since 4.0.0 |
| 621 | */ |
| 622 | export const transformPullBracket = <A, E, R, B, E2, R2, EX, RX>( |
| 623 | self: Stream<A, E, R>, |
| 624 | f: ( |
| 625 | pull: Pull.Pull<Arr.NonEmptyReadonlyArray<A>, E, void, R>, |
| 626 | scope: Scope.Scope, |
| 627 | forkedScope: Scope.Scope |
| 628 | ) => Effect.Effect< |
| 629 | Pull.Pull<Arr.NonEmptyReadonlyArray<B>, E2, void, R2>, |
| 630 | EX, |
| 631 | RX |
| 632 | > |
| 633 | ): Stream<B, EX | Pull.ExcludeDone<E2>, R | R2 | RX> => |
| 634 | fromChannel( |
| 635 | Channel.fromTransformBracket((_, scope, forkedScope) => |
| 636 | Effect.flatMap(Channel.toPullScoped(self.channel, scope), (pull) => f(pull, scope, forkedScope)) |
| 637 | ) |
| 638 | ) |
| 639 | |
| 640 | /** |
| 641 | * Creates a channel from a stream. |
no test coverage detected