Join Slack
Powered by
` operator fun invoke(args: EmbedDSLHandle.() -...
# getting-started
h
Hamza
05/27/2018, 2:46 AM
operator fun invoke(args: EmbedDSLHandle.() -> Unit) {}
k
karelpeeters
05/27/2018, 7:29 AM
It defines a function that takes an anonymous function literal with receiver, read this
https://kotlinlang.org/docs/reference/lambdas.html#function-literals-with-receiver
and then the linked page
https://kotlinlang.org/docs/reference/type-safe-builders.html
for how to apply them.
karelpeeters
05/27/2018, 6:43 PM
It even overloads the
()
operator:
https://kotlinlang.org/docs/reference/operator-overloading.html
Open in Slack
Previous
Next