The Problem Statement: try{
//I am Jill's intelligent code
}catch (ex:Exception){
//I am Jack's frustrated code
} As you might have noticed, the above code is kinda sexist.No offence intended, but Jack would have to handle exceptions everywhere across the app making him feel really frustrated and causing work place friction. The Solution: Jack thinks this through.Then suddenly Kotlin’s higher order functions come to the rescue.This way Jack has to write this once.Also Jack doesn’t need to write this in a class.