| 1388 | |
| 1389 | /* @internal */ |
| 1390 | export const whileLoop = <A, E, R>( |
| 1391 | options: { |
| 1392 | readonly while: LazyArg<boolean> |
| 1393 | readonly body: LazyArg<Effect.Effect<A, E, R>> |
| 1394 | readonly step: (a: A) => void |
| 1395 | } |
| 1396 | ): Effect.Effect<void, E, R> => { |
| 1397 | const effect = new EffectPrimitive(OpCodes.OP_WHILE) as any |
| 1398 | effect.effect_instruction_i0 = options.while |
| 1399 | effect.effect_instruction_i1 = options.body |
| 1400 | effect.effect_instruction_i2 = options.step |
| 1401 | return effect |
| 1402 | } |
| 1403 | |
| 1404 | /* @internal */ |
| 1405 | export const fromIterator = <Eff extends YieldWrap<Effect.Effect<any, any, any>>, AEff>( |