Using Kotlin for Data Builders
In Kotlin, functions whose last argument is a lambda, i call them end-lambda’s, make natural expressions of tree-shaped data builders. Say you’re building Performances, where a Performance includes (possibly) the list of songs being performed. making shit up here, it might look like: performance { song { } song { } } First thing you notice: this thing is building some tree-shaped data, and it’s tree-shaped. None of this "song1= … song2= … performance = Performance(song1, song2) shit. If you’re […]
Using Kotlin for Data Builders See Full Post