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

Add none/some builders for Task and Coeval #1286

Merged
merged 2 commits into from Oct 15, 2020

Conversation

pchpsky
Copy link
Contributor

@pchpsky pchpsky commented Oct 2, 2020

Resolves #1281

@@ -2872,6 +2872,12 @@ object Task extends TaskInstancesLevel1 {
/** Builds a [[Task]] of Right */
def right[A, B](a: B): Task[Either[A, B]] = Task.pure(Right(a))

/** A [[Task]] of None */
def none[A]: Task[Option[A]] = Task.pure(Option.empty[A])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe Now(Option.empty[A])?
for consistency with the rest of the code here and less calls

Avasil
Avasil approved these changes Oct 15, 2020
Copy link
Collaborator

@Avasil Avasil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you and sorry for the delay :)

@Avasil Avasil merged commit 779c436 into monix:series/3.x Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add none/some builders for Task and Coeval
3 participants