ramda-adjunct icon indicating copy to clipboard operation
ramda-adjunct copied to clipboard

bimap - Bifunctor

Open char0n opened this issue 5 years ago • 1 comments

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 avatar May 13 '19 21:05 char0n

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

char0n avatar Dec 25 '19 10:12 char0n