/**
 * Given a list of patients, the function prints the names of the patients
 * with an infinite loop.
 *
 * @param patients A list of patients
 */
fun printPatientsNames(patients: List<Map<String, Any>>) {

    var iterator = 0

    while (true) {
        if (iterator >= patients.size) {
            iterator = 0
        }

        println(patients[iterator]["name"])

        iterator++
    }
}
/**
 * Given a list of patients, the function prints the names of the patients
 * with an infinite loop.
 *
 * @param patients A list of patients
 */
fun printPatientsNames(patients: List<Map<String, Any>>) {
/**
 * Given a list of patients, the function prints the names of the patients
 * with an infinite loop.
 *
 * @param patients A list of patients
 */
fun printPatientsNames(patients: List<Map<String, Any>>) {

    var iterator = 0

    while (true) {
        if (iterator >= patients.size) {
            iterator = 0
        }

        println(patients[iterator]["name"])

        iterator++
    }
}