-
Notifications
You must be signed in to change notification settings - Fork 30
["Request"] Add a fold
function for nullable types
#241
Comments
If we mirror the current Option API for nullables it will make migration much easier as we can use ReplaceWith without any compilation errors after the replacement. Aditionally, having |
Can we make these inline? |
After more time than I would like to admit, I realised one problem... Maybe if we call it That would be the ideal solution, in reality, so we can avoid polluting the global scope with extension functions like these. |
Yes, we currently also have this issue with
|
What version are you currently using?
0.11
What would you like to see?
When moving from
Option
to using nullable types, thefold
function is missing so you end up doing:?.let { ... } ?: run { ... }
We can add a function:
that would make this a bit easier to work with.
Source: #239 (comment) suggested by @pablisco
You can also see the pattern in the PR.
The text was updated successfully, but these errors were encountered: