-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce bindAll
#3486
Introduce bindAll
#3486
Conversation
🦋 Changeset detectedLatest commit: 817f169 The changes in this PR will be included in the next version bump. This PR includes changesets to release 31 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
is Effect.Do.pipe(
Effect.bind("x", () => Effect.succeed(2)),
Effect.bind("y", ({ x }) =>
Effect.all({
a: Effect.succeed(x),
b: Effect.succeed("ops")
}, { mode: "either" }))
) vs Effect.Do.pipe(
Effect.bind("x", () => Effect.succeed(2)),
Effect.bindAll(({ x }) => ({
a: Effect.succeed(x),
b: Effect.succeed("ops")
}), { mode: "either" })
) |
4d7b312
to
4e3d543
Compare
With Effect.Do.pipe(
Effect.bind("x", () => Effect.succeed(2)),
Effect.flatMap((value) =>
Effect.all(
{
a: Effect.succeed(value.x),
b: Effect.succeed("ops"),
},
{ concurrency: "unbounded" },
).pipe(Effect.map((result) => ({ ...value, ...result }))),
),
) |
On the one hand, I agree with Guilio. On the other hand, I saw that Michael approved of the idea. I had time to contribute to the effect and practice with the types) |
6c5d26a
to
aacbb7a
Compare
59d9522
to
9d8acac
Compare
@tim-smart, please confirm that everything is fine |
/rebase |
2cdf5df
to
3b58adf
Compare
6f12b7a
to
9ea0f4f
Compare
/rebase |
c784a5a
to
83d63cb
Compare
Type
Description
Related
bindAll
with Unbounded Concurrency #3484