concept element - process function in category kotlin
appears as: element-processing function

This is an excerpt from Manning's book The Joy of Kotlin.
14.4.5 Step 5: Making the element-processing function a parameter
The two remaining problems can be solved with a single change: passing the element-processing function as a parameter to the
readXmlFilemethod. This way, this function has a single task: it reads the list of first-level elements in the file, applies a configurable function to this list, and returns the result. The main difference is that the function will no longer produce a list of strings and apply a string effect. You’ll need to make the function generic. This means only the following changes: