Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

fix Effect.forEach usage #164

Merged
merged 1 commit into from
Aug 30, 2023
Merged

fix Effect.forEach usage #164

merged 1 commit into from
Aug 30, 2023

Conversation

fubhy
Copy link
Member

@fubhy fubhy commented Aug 30, 2023

Effect.forEach has the callback signature f:

f: (a: A, i: number) => Effect<R, E, B>,

But .runForEach and .contramapEffect don't expect a second parameter. Hence, when using it in combination with something like Effect.log which has an optional second parameter, we'll pass the second parameter incorrectly.

This fixes Effect-TS/io#639

@changeset-bot
Copy link

changeset-bot bot commented Aug 30, 2023

⚠️ No Changeset found

Latest commit: f40e5b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mikearnaldi mikearnaldi merged commit d031d7f into main Aug 30, 2023
1 check passed
@mikearnaldi mikearnaldi deleted the fix-for-each branch August 30, 2023 14:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Cause.reduceWithContext
2 participants