Join Slack
Communities
Powered by
Hi all, I'm new to Kotlin, is there any way to exe...
# getting-started
h
Hugh
11/21/2017, 12:43 PM
Hi all, I'm new to Kotlin, is there any way to execute code during construction of a data class, I want to call a function on the value as it's being passed into the constructor
k
karelpeeters
11/21/2017, 12:44 PM
init {}
h
hho
11/21/2017, 12:46 PM
init
in the docs:
https://kotlinlang.org/docs/reference/classes.html#constructors
h
Hugh
11/21/2017, 12:47 PM
Super, thanks
@karelpeeters
and
@hho
2
Views
Open in Slack
Previous
Next