Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added OptionT.none, resolving #935 #946

Merged
merged 3 commits into from
Apr 1, 2016
Merged

Conversation

MaxWorgan
Copy link
Contributor

I also added an alias from pure to some - that was never mentioned in the issue but seemed reasonable to me.

@codecov-io
Copy link

Current coverage is 89.79%

Merging #946 into master will increase coverage by +0.86% as of f18a93a

@@            master    #946   diff @@
======================================
  Files          179     180     +1
  Stmts         2133    2146    +13
  Branches        42      42       
  Methods          0       0       
======================================
+ Hit           1897    1927    +30
  Partial          0       0       
+ Missed         236     219    -17

Review entire Coverage Diff as of f18a93a

Powered by Codecov. Updated on successful CI builds.

@@ -72,6 +72,23 @@ val result: Future[Option[String]] = ot.value // Future(Some("Hello Jane Doe"))

```

## From `A` to `OptionT[F,A]`

If you have only an `A` and you wish to *lift* it into an `OptionT[F,A]` assuming you have an applicative instance for F you can use `some` which is an alias for `pure`. There also exists a `none` method which can be used to create an OptionT[F,A], where the Option wrapped A type is actually a `None`:
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be nice to make applicative a link to the Applicative doc.

@ceedubs
Copy link
Contributor

ceedubs commented Mar 27, 2016

👍 thanks!

@stew
Copy link
Contributor

stew commented Apr 1, 2016

👍

@stew stew merged commit 08d843d into typelevel:master Apr 1, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants