Skip to content
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

bimap - Bifunctor #926

Open
char0n opened this issue May 13, 2019 · 1 comment
Open

bimap - Bifunctor #926

char0n opened this issue May 13, 2019 · 1 comment

Comments

@char0n
Copy link
Owner

char0n commented May 13, 2019

Is your feature request related to a problem? Please describe.

Static function which support fantasy/land bifunctor specification or calls a bimap method on provided value. If fantasy/land specification cannot be found, nor bimap method exists, we should return original value.

Describe the solution you'd like

const left = Monet.Either.Left(1);
const right = Monet.Either.Right(1);

RA.bimap(i => i + 1, i => i + 2, left); // Left(2)
RA.bimap(i => i + 1, i => i + 2, right); // Right(3)

Describe alternatives you've considered

--

Additional context

Monet - https://monet.github.io/monet.js/
Bifunctor specification: https://github.com/fantasyland/fantasy-land#bifunctor

char0n referenced this issue May 13, 2019
Included are ramda-fantasy, monet.js and folktale.

Closes #922
@char0n char0n changed the title bimap bimap - Bidirectional map Dec 25, 2019
@char0n char0n changed the title bimap - Bidirectional map bimap - Bifunctor Dec 25, 2019
@char0n
Copy link
Owner Author

char0n commented Dec 25, 2019

@EarthyOrange can you pls verify this issue ? Thank you!

@char0n char0n added the Hacktoberfest Hacktoberfest 2020 label Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant