Can anyone enlightens me about below shortcut structure in Kotlin:
fun letsSearch(search: SearchModel.() -> SearchModel) {
//how to utilize search param here..
}
SearchModel is passed into the lambda as ‘this’ and lambda expects it will return a SearchModel instance, so this basically looks like a function to update SearchModel, probably via copy