This is a porting of the source code in Chapter 13 of The Art of Readable Code, written in Kotlin. Original code was written in C++.
It looked hard to me to understand C++ code. To understand deeply and practice of Kotlin, I re-writeed this to Kotlin.
refer folder under lib/src/main/kotlin/mhc
to see the code.