Join Slack
Powered by
you could always make yourself an extension functi...
# language-proposals
k
kevinmost
05/27/2016, 1:47 PM
you could always make yourself an extension function I guess
inline fun <T> Optional<T>.unwrap() = orElse(null)
And then the nested Optionals could be used like
optional.unwrap()?.unwrap()
. Kind of gross, but I think any way of working with a nested Optional would be gross
Open in Slack
Previous
Next