Infix notations for functions

To bring our code closer to the natural language, Kotlin provides infix notations for the functions containing a single parameter. This way, we can invoke the function without using brackets. In this recipe, we are going to learn how to design an infix extension function for the String type, named concat(), which is responsible for the concatenation of two string values.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.238.151