Skip to content

Tag Archives: Kotlin Functions

In this article, we are going to discuss how to split the original collection into pair of collections, because sometimes while coding, you wish that… Read More
Kotlin is a statically typed, general-purpose programming language developed by JetBrains, that has built world-class IDEs like IntelliJ IDEA, PhpStorm, App code, etc. It was… Read More
A parameter is a value that you can pass to a method. Then the method can use the parameter as though it were a local… Read More
The idea behind functions is very simple: split up a large program into smaller chunks that can be reasoned more easily and allow the reuse… Read More
Kotlin is a statically typed, general-purpose programming language developed by JetBrains, that has built world-class IDEs like IntelliJ IDEA, PhpStorm, App code, etc. It was… Read More
In Kotlin, you can provide default values to parameters in a function definition. If the function is called with arguments passed, those arguments are used… Read More
Kotlin gives us the power to declare high-order functions. In a high-order function, we can pass and return functions as parameters. This is an extremely… Read More
There are a lot of scenarios in which we need to pass variable arguments to a function. In Kotlin, You can pass a variable number… Read More
also is an extension function to Template class which takes a lambda as a parameter, applies contract on it, executes the lambda function within the… Read More
In Kotlin, we can have functions as expressions by creating lambdas. Lambdas are function literals that is, they are not declared as they are expressions… Read More
While defining a function in Kotlin we have many optional annotations. We will learn each of them one by one. Defining a function in Kotlin:… Read More
In this article, we will learn infix notation used in Kotlin functions. In Kotlin, a functions marked with infix keyword can also be called using… Read More
In Kotlin, the higher-order functions or lambda expressions, all stored as an object so memory allocation, for both function objects and classes, and virtual calls… Read More
Kotlin language has superb support for functional programming. Kotlin functions can be stored in variables and data structures, passed as arguments to and returned from… Read More
In this tutorial, we will learn Kotlin Recursive function. Like other programming languages, we can use recursion in Kotlin. A function that calls itself is… Read More