anonymous functions

Privacy Policy

Functions in Kotlin

In this post I will talk about 5 cool things that functions can do in Kotlin, better than methods in Java.   1. Forget about overloaded methods In Java, when you need the same method to have 1 parameter in one case and more parameters in another case, you would have to overload the method. […]

, , , , , ,
Privacy Policy

Anonymous Functions and Lambdas – Kotlin

Note! This is a post for beginners in Kotlin language. What are lambdas and anonymous functions? In order to define them let’s see what is a function literal. Function literal Function literal is a function that was not declared, but was passed as an expression. val sum = { a: Int, b: Int -> a + b

, ,
Scroll to Top