Skip to content

Add none/some builders for Task and Coeval#1286

Merged
Avasil merged 2 commits into
monix:series/3.xfrom
pchpsky:task-option-builders
Oct 15, 2020
Merged

Add none/some builders for Task and Coeval#1286
Avasil merged 2 commits into
monix:series/3.xfrom
pchpsky:task-option-builders

Conversation

@pchpsky

@pchpsky pchpsky commented Oct 2, 2020

Copy link
Copy Markdown
Contributor

Resolves #1281

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
Copy Markdown
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 left a comment

Copy link
Copy Markdown
Collaborator

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