Kotlin Unpacking Params
4 min readJul 31, 2019
Destructuring Declarations in Kotlin
De-structuring at its core a syntactic sugar to easily unpack parameters out of an object or array and declare local all in one shot.
Don’t miss out on the course on Generative AI using Kotlin, Jetpack Compose, Langchain4j, and Ollama. You will learn hands-on by building 6 AI apps. Join now for lifetime access, but hurry — prices increase after July 1st!
NOTE: As of Dec-14/20 Medium Github Snippets aren’t working properly, please read the article from my official site if it stays broken.
Basically instead of doing this :