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

Adding sample to on Option docs #953

Conversation

fabriciorissetto
Copy link
Contributor

Including sample call to toOption() in the option docs.

} else {
None
}
fun <T> T?.toOption(): Option<T> = this?.let { Some(it) } ?: None
Copy link
Member

Choose a reason for hiding this comment

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

<333333

@@ -121,6 +121,13 @@ Arrow also adds syntax to all datatypes so you can easily lift them into the con
none<String>()
```

```kotlin:ank
Copy link
Member

Choose a reason for hiding this comment

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

Ank is our snippet compiler. It outputs the toString() of the value returned by the snippet. You can either remove :ank and hardcode the results as they are now, or split it into 2 snippets and let our Ank processor compile them ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awsome! Done 👍

@pakoito
Copy link
Member

pakoito commented Jul 26, 2018

Thanks for finding the time to add this to the documentation :D Just one comment about one of the snippets, ready to go otherwise!

@codecov
Copy link

codecov bot commented Jul 26, 2018

Codecov Report

Merging #953 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #953      +/-   ##
============================================
- Coverage     46.59%   46.57%   -0.02%     
  Complexity      643      643              
============================================
  Files           306      306              
  Lines          7965     7963       -2     
  Branches        816      816              
============================================
- Hits           3711     3709       -2     
  Misses         3927     3927              
  Partials        327      327
Impacted Files Coverage Δ Complexity Δ
...re/arrow-core/src/main/kotlin/arrow/core/Option.kt 58.33% <100%> (-1.35%) 14 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18f2d13...1bb8a5f. Read the comment docs.

Copy link
Member

@pakoito pakoito left a comment

Choose a reason for hiding this comment

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

Party time 🌮

@pakoito pakoito merged commit 463417e into arrow-kt:master Jul 26, 2018
@pakoito
Copy link
Member

pakoito commented Jul 26, 2018

Thanks for contributing to the docs, the module needs lots of love from people who are learning, because you're the best to understand what you were missing. Any contribution or missing spot you find, just tell us!

@fabriciorissetto
Copy link
Contributor Author

Thanks @pakoito, I'll be glad to help if I find more improvement points 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants