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

DISCUSSION : Extension #126

Open
wer-mathurin opened this issue Aug 7, 2023 · 1 comment
Open

DISCUSSION : Extension #126

wer-mathurin opened this issue Aug 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@wer-mathurin
Copy link

We added this extension in our project and just sharing it:

extension FlatMapOnNull<L, R> on TaskEither<L, R?> {
TaskEither<L, R> flatMapOnNull(L left) {
return flatMap(
(r) => r != null ? TaskEither.right(r) : TaskEither.left(left));
}
}

@SandroMaglione : Do you see value adding this to the library?

@SandroMaglione
Copy link
Owner

Hi @wer-mathurin,

I generally would avoid expanding too much the core API. In which situations are you using this? How often is this needed in your opinion?

@SandroMaglione SandroMaglione added the enhancement New feature or request label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants