Lambda

What’s Trailing Lambda and Comma in Kotlin?

Trailing lambda is one thing new in Kotlin that different programming language does not have. No less than, I don’t conscious about another programming language that helps it. Whilst you see code like this: var consequence = operateOnNumbers(a, b) { input1, input2 -> input1 + input2 } println(consequence) It method operateOnNumbers() has 3 parameters. The […]

What’s Trailing Lambda and Comma in Kotlin? Read More »

Simplify ViewModelProvider.Manufacturing unit() Implementation with Kotlin Lambda and Object Expressions

In case you are like me and now have no longer gotten used to the Dependency Injection framework (do not you assume it complicates issues?), if you have been enforcing the ViewModelProvider.Manufacturing unit() interface on your view fashions that has customized constructor parameters. More than one ViewModel Manufacturing unit Categories magnificence AViewModelFactory(personal val repository: ARepository)

Simplify ViewModelProvider.Manufacturing unit() Implementation with Kotlin Lambda and Object Expressions Read More »

Scroll to Top