Effect-TS / effect

An ecosystem of tools to build robust applications in TypeScript
https://effect.website
MIT License
7.71k stars 245 forks source link

Add getSemigroupUnion, getMonoidUnion and getSemigroupIntersection for Record #3840

Closed FredericEspiau closed 1 month ago

FredericEspiau commented 1 month ago

Type

Description

Creates getSemigroupUnion, getMonoidUnion and getSemigroupIntersection for Record

I didn't create anything for difference as I didn't see the point I didn't ceate a Monoid for intersection as I can't think of a logical empty element (I could do it with some kind of Proxy maybe ?)

Note: I already created a PR similar to this one a loooooong time ago but I messed up the git history so I just recreated a new PR altogether. @gcanti already left some comments that I took into consideration in this new PR. The previous PR was this one: https://github.com/Effect-TS/effect/pull/2635 (don't try to look at the files it makes Github melt)

Related

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 8fb2d08ecad9de097d7cb725c3480d8e671b6654

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages | Name | Type | | -------------------- | ----- | | @effect/typeclass | Patch | | @effect/printer-ansi | Patch | | @effect/printer | Patch | | @effect/cli | Patch |

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

gcanti commented 1 month ago

I didn't ceate a Monoid for intersection as I can't think of a logical empty element

it's fine, it doesn't exist