Last active
August 27, 2019 20:41
-
-
Save Rasalexman/45c6c0ec3d16712e8580f45bbffd1a83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline fun <reified T : User> user(noinline creator: UserBuilder.() -> Unit): T { | |
return initClass(UserBuilder(), creator).build() | |
} | |
inline fun <T, R> initClass(tag: T, init: T.() -> R): T { | |
tag.init() | |
return tag | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment