Understanding `Effect.suspend` in Effect Typescript Library

hi, i have a question regarding Effect.suspend, in docs it says, use this to lazily compute effect when doing heavy task. i did not quite understand this, what does Effect.suspend do internally? and what does it do differently if i do something like this, yield* Effect.gen(function* () { return yield* someHeavyComputation() } vs yield* Effect.suspend(() => someHeavyComputation())
Was this page helpful?