Effect.gen(function* () {
const anotherOption = yield* get
const nestedOption = Option.map(anotherOption, () => get)
// type of nestedOption: Option.Option<Effect.Effect<Option.Option<number>>>
// Simplest way to return the nestedOption as Effect<Option<number>> or just Option<number>
// basically flattening the 3 layers of effect and option but keeping it as option?
})
Effect.gen(function* () {
const anotherOption = yield* get
const nestedOption = Option.map(anotherOption, () => get)
// type of nestedOption: Option.Option<Effect.Effect<Option.Option<number>>>
// Simplest way to return the nestedOption as Effect<Option<number>> or just Option<number>
// basically flattening the 3 layers of effect and option but keeping it as option?
})