Join Slack
Powered by
also, is there a way to return "self" like: `fun x...
# getting-started
j
Jonathan Locke
03/02/2023, 1:48 PM
also, is there a way to return "self" like:
fun x() : this
a
August Lilleaas
03/02/2023, 2:05 PM
not on classes/interfaces afaik, but you can do it with extension functions
fun <T> T.foo(): T = this
j
Jonathan Locke
03/02/2023, 7:00 PM
that's cool. thanks!
2
Views
Open in Slack
Previous
Next