Recent Posts

Abstract or Interface

1 minute read

An abstract class is like an ordinary class except one or more functions or properties is incomplete - ie. a function without implementation or a property wi...

Ask for inheritance

less than 1 minute read

Inheritance is a mechanism for creating a new class by reusing and modifying an existing class.

Folding and Reducing List

1 minute read

fold() combines all elements of a list, in order to generate a single result. Here is how we can use fold() to calculate the sum -

Elegant Local Function

1 minute read

What exactly is local function? It was new to me in Kotlin and thought it is interesting to dig deeper. In a normal class, we have many functions within a cl...

Sequence: lazy evaluation

2 minute read

What is Sequence? A Kotlin Sequence is like a List, but you can only iterate. You cannot index into Sequence. And this restriction produces very efficient ch...