-
Notifications
You must be signed in to change notification settings - Fork 437
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,16 @@ 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 commentThe reason will be displayed to describe this comment to others. Learn more. Ank is our snippet compiler. It outputs the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awsome! Done 👍 |
||
val nullableValue: String? = null | ||
nullableValue.toOption() | ||
``` | ||
|
||
```kotlin:ank | ||
val nullableValue: String? = "Hello" | ||
nullableValue.toOption() | ||
``` | ||
|
||
Arrow contains `Option` instances for many useful typeclasses that allows you to use and transform optional values | ||
|
||
[`Functor`]({{ '/docs/typeclasses/functor/' | relative_url }}) | ||
|
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