(
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
>
)
| 669 | * @since 4.0.0 |
| 670 | */ |
| 671 | export const transformPullBracket = <A, E, R, B, E2, R2, EX, RX>( |
| 672 | self: Stream<A, E, R>, |
| 673 | f: ( |
| 674 | pull: Pull.Pull<Arr.NonEmptyReadonlyArray<A>, E, void, R>, |
| 675 | scope: Scope.Scope, |
| 676 | forkedScope: Scope.Scope |
| 677 | ) => Effect.Effect< |
| 678 | Pull.Pull<Arr.NonEmptyReadonlyArray<B>, E2, void, R2>, |
| 679 | EX, |
| 680 | RX |
| 681 | > |
| 682 | ): Stream<B, EX | Pull.ExcludeDone<E2>, R | R2 | RX> => |
| 683 | fromChannel( |
| 684 | Channel.fromTransformBracket((_, scope, forkedScope) => |
| 685 | Effect.flatMap(Channel.toPullScoped(self.channel, scope), (pull) => f(pull, scope, forkedScope)) |
| 686 | ) |
| 687 | ) |
| 688 | |
| 689 | /** |
| 690 | * Creates a channel from a stream. |
no test coverage detected