From 8ac5e9f5ef6b3bd4a5969a921dcf1db35c11cc66 Mon Sep 17 00:00:00 2001 From: Jonathan Feldman Date: Wed, 11 Feb 2026 23:37:58 -0800 Subject: [PATCH] Update example in cause.mdx to be a little more illistrative I feel like calling the Effect.all function with `{ concurrentcy: "unbounded" }` represents the usefulness of the Cause.failures and Cause.defects functions a little clearer than the existing version without it being set to unbounded. Then again, the existing version made me think for a bit so maybe that's useful in its own right. --- content/src/content/docs/docs/data-types/cause.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/src/content/docs/docs/data-types/cause.mdx b/content/src/content/docs/docs/data-types/cause.mdx index e00c24f41..3637c71e0 100644 --- a/content/src/content/docs/docs/data-types/cause.mdx +++ b/content/src/content/docs/docs/data-types/cause.mdx @@ -272,7 +272,8 @@ const program = Effect.gen(function* () { Effect.fail("error 1"), Effect.die("defect"), Effect.fail("error 2") - ]) + ], + { concurrency: "unbounded" }) ) console.log(Cause.failures(cause)) console.log(Cause.defects(cause)) @@ -281,7 +282,7 @@ const program = Effect.gen(function* () { Effect.runPromise(program) /* Output: -{ _id: 'Chunk', values: [ 'error 1' ] } -{ _id: 'Chunk', values: [] } +{ _id: 'Chunk', values: [ 'error 1', 'error 2' ] } +{ _id: 'Chunk', values: [ 'defect' ] } */ ```