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
Adding sample to on Option docs #953
Conversation
} else { | ||
None | ||
} | ||
fun <T> T?.toOption(): Option<T> = this?.let { Some(it) } ?: None |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awsome! Done 👍
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 Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Party time 🌮
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! |
Thanks @pakoito, I'll be glad to help if I find more improvement points 👍 |
Including sample call to
toOption()
in the option docs.