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

Create Future (or Task) monad #31

Closed
myugen opened this issue Sep 9, 2024 · 0 comments · Fixed by #32
Closed

Create Future (or Task) monad #31

myugen opened this issue Sep 9, 2024 · 0 comments · Fixed by #32
Assignees
Labels
enhancement New feature or request new monad Addition of new monad to library
Milestone

Comments

@myugen
Copy link
Collaborator

myugen commented Sep 9, 2024

A Future represents a value which may become available at some point (asynchronous action). This value is usually the result of some computation.

  1. If the computation has not yet completed, we say that the Future is not completed.
  2. If the computation has completed with a value or with an exception, we say that the Future is completed.

Completion can take one of two forms:

  1. When a Future is completed with a value, we say that the future was successfully completed with that value.
  2. When a Future is completed with an exception thrown by the computation, we say that the Future was failed with that exception.

For value evaluation, this monad should provide a callback function to call once the Future is completed.

@myugen myugen added enhancement New feature or request new monad Addition of new monad to library labels Sep 9, 2024
@myugen myugen self-assigned this Sep 10, 2024
@myugen myugen linked a pull request Sep 10, 2024 that will close this issue
8 tasks
@myugen myugen added this to the Release 1.1.0 milestone Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new monad Addition of new monad to library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant