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

Added async functions for converting monad types #20

Merged
merged 1 commit into from
Aug 6, 2023
Merged

Conversation

apfohl
Copy link
Contributor

@apfohl apfohl commented Aug 3, 2023

For Maybe to Either conversion:

  • Task<Either<TLeft, T>> ToEitherAsync<T, TLeft>(this Maybe maybe, TLeft left)
  • Task<Either<TLeft, T>> ToEitherAsync<T, TLeft>(this Task<Maybe> maybeTask, TLeft left)

For Either to Maybe conversion:

  • Task<Maybe> ToMaybeAsync<TLeft, TRight>(this Either<TLeft, TRight> either)
  • Task<Maybe> ToMaybeAsync<TLeft, TRight>(this Task<Either<TLeft, TRight>> eitherTask)

@apfohl apfohl added the enhancement New feature or request label Aug 3, 2023
@apfohl apfohl force-pushed the async-helpers branch 2 times, most recently from 95f5ad9 to c71b5a3 Compare August 3, 2023 07:54
For Maybe to Either conversion:

- Task<Either<TLeft, T>> ToEitherAsync<T, TLeft>(this Maybe<T> maybe, TLeft left)
- Task<Either<TLeft, T>> ToEitherAsync<T, TLeft>(this Task<Maybe<T>> maybeTask, TLeft left)

For Either to Maybe conversion:

- Task<Maybe<TRight>> ToMaybeAsync<TLeft, TRight>(this Either<TLeft, TRight> either)
- Task<Maybe<TRight>> ToMaybeAsync<TLeft, TRight>(this Task<Either<TLeft, TRight>> eitherTask)
@Dirk-Peters Dirk-Peters merged commit 8604cd5 into main Aug 6, 2023
@Dirk-Peters Dirk-Peters deleted the async-helpers branch August 6, 2023 14:35
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

Successfully merging this pull request may close these issues.

2 participants