Join Slack
Powered by
what's the proper way to define a void fun
# announcements
x
xenoterracide
12/14/2018, 6:48 AM
what's the proper way to define a void fun
j
jkbbwr
12/14/2018, 6:52 AM
Just don't define a return type.
Copy code
fun something() { }
g
gildor
12/14/2018, 7:29 AM
you also can explicitly set return type
Unit
, but it’s not recommended style:
Copy code
fun something(): Unit { }
x
xenoterracide
12/14/2018, 6:44 PM
thanks
2
Views
Open in Slack
Previous
Next