Join Slack
Powered by
how do you avoid having to return null in java whe...
# announcements
t
tipsy
01/04/2019, 8:47 AM
how do you avoid having to return null in java when the param is
(Something) -> Unit
?
g
gsala
01/04/2019, 8:52 AM
return Unit.INSTANCE
?
t
tipsy
01/04/2019, 8:55 AM
sorry, badly worded question. how do you avoid having to return at all? i want it to behave like a void method in java
g
gsala
01/04/2019, 9:00 AM
I don't think that's possible. But I can't find a source for you
t
tipsy
01/04/2019, 9:01 AM
you're probably right. i've tried this before, and ended up writing the code in java instead
Open in Slack
Previous
Next