// ets_tracing: off import * as T from "../../../../Effect/index.js" import type * as C from "../core.js" import * as LoopOnPartialChunksElements from "./loopOnPartialChunksElements.js" /** * Maps over elements of the stream with the specified effectful function. */ export function mapEffect_( self: C.Stream, f: (a: A) => T.Effect ): C.Stream { return LoopOnPartialChunksElements.loopOnPartialChunksElements_( self, (a, emit) => T.chain_(f(a), emit) ) } /** * Maps over elements of the stream with the specified effectful function. * * @ets_data_first mapEffect_ */ export function mapEffect( f: (a: A) => T.Effect ): (self: C.Stream) => C.Stream { return (self) => mapEffect_(self, f) }