(
options: {
readonly initial: S
readonly maxCost: number
readonly cost: (s: S, input: In) => Effect.Effect<number, E, R>
readonly decompose: (input: In) => Effect.Effect<Chunk.Chunk<In>, E2, R2>
readonly body: (s: S, input: In) => Effect.Effect<S, E3, R3>
}
)
| 1209 | |
| 1210 | /** @internal */ |
| 1211 | export const foldWeightedDecomposeEffect = <S, In, E, R, E2, R2, E3, R3>( |
| 1212 | options: { |
| 1213 | readonly initial: S |
| 1214 | readonly maxCost: number |
| 1215 | readonly cost: (s: S, input: In) => Effect.Effect<number, E, R> |
| 1216 | readonly decompose: (input: In) => Effect.Effect<Chunk.Chunk<In>, E2, R2> |
| 1217 | readonly body: (s: S, input: In) => Effect.Effect<S, E3, R3> |
| 1218 | } |
| 1219 | ): Sink.Sink<S, In, In, E | E2 | E3, R | R2 | R3> => |
| 1220 | suspend(() => |
| 1221 | new SinkImpl( |
| 1222 | foldWeightedDecomposeEffectLoop( |
| 1223 | options.initial, |
| 1224 | options.maxCost, |
| 1225 | options.cost, |
| 1226 | options.decompose, |
| 1227 | options.body, |
| 1228 | 0, |
| 1229 | false |
| 1230 | ) |
| 1231 | ) |
| 1232 | ) |
| 1233 | |
| 1234 | /** @internal */ |
| 1235 | export const foldWeightedEffect = <S, In, E, R, E2, R2>( |
no test coverage detected
searching dependent graphs…