Open patroza opened 3 weeks ago
Bad: Effect.gen(function* () { Effect.succeed(1) }) Effect.gen(function* () { return Effect.succeed(1) }) Effect.gen(function* () { const a = Effect.succeed(1); return a }) Effect.gen(function* () { const a = Effect.succeed(1) }) // wishful thinking, would require deep knowledge
Effect.gen(function* () { Effect.succeed(1) })
Effect.gen(function* () { return Effect.succeed(1) })
Effect.gen(function* () { const a = Effect.succeed(1); return a })
Effect.gen(function* () { const a = Effect.succeed(1) })
Good: Effect.gen(function* () { yield* Effect.succeed(1) }) Effect.gen(function* () { return yield* Effect.succeed(1) }) Effect.gen(function* () { const a = Effect.succeed(1); return yield* a })
Effect.gen(function* () { yield* Effect.succeed(1) })
Effect.gen(function* () { return yield* Effect.succeed(1) })
Effect.gen(function* () { const a = Effect.succeed(1); return yield* a })
Bad:
Effect.gen(function* () { Effect.succeed(1) })
Effect.gen(function* () { return Effect.succeed(1) })
Effect.gen(function* () { const a = Effect.succeed(1); return a })
Effect.gen(function* () { const a = Effect.succeed(1) })
// wishful thinking, would require deep knowledgeGood:
Effect.gen(function* () { yield* Effect.succeed(1) })
Effect.gen(function* () { return yield* Effect.succeed(1) })
Effect.gen(function* () { const a = Effect.succeed(1); return yield* a })