/**
 * This function takes a list representing a crime record and a string representing a new crime.
 * It adds the new crime to the crime record list. If the crime starts with 'murder',
 * 'kidnapping', or 'robbery', it adds a note to the crime record indicating a dangerous crime.
 * Otherwise, it adds a note indicating a minor crime.
 *
 * @param crimeRecord A list representing a crime record
 * @param crime A string representing a new crime
 * @return Updated crime record list
 */
fun addCrimeToRecord(crimeRecord: MutableList<String>, crime: String): MutableList<String> {

    crimeRecord.add(crime)

    when {
        crime.startsWith("murder") -> {
            crimeRecord.add("--> DANGEROUS CRIME: MURDER")
        }
        crime.startsWith("kidnapping") -> {
            crimeRecord.add("--> DANGEROUS CRIME: KIDNAPPING")
        }
        crime.startsWith("robbery") -> {
            crimeRecord.add("--> DANGEROUS CRIME: ROBBERY")
        }
        else -> {
            crimeRecord.add("--> MINOR CRIME")
        }
    }

    return crimeRecord
}
/**
 * This function takes a list representing a crime record and a string representing a new crime.
 * It adds the new crime to the crime record list. If the crime starts with 'murder',
 * 'kidnapping', or 'robbery', it adds a note to the crime record indicating a dangerous crime.
 * Otherwise, it adds a note indicating a minor crime.
 *
 * @param crimeRecord A list representing a crime record
 * @param crime A string representing a new crime
 * @return Updated crime record list
 */
fun addCrimeToRecord(crimeRecord: MutableList<String>, crime: String): MutableList<String> {
/**
 * This function takes a list representing a crime record and a string representing a new crime.
 * It adds the new crime to the crime record list. If the crime starts with 'murder',
 * 'kidnapping', or 'robbery', it adds a note to the crime record indicating a dangerous crime.
 * Otherwise, it adds a note indicating a minor crime.
 *
 * @param crimeRecord A list representing a crime record
 * @param crime A string representing a new crime
 * @return Updated crime record list
 */
fun addCrimeToRecord(crimeRecord: MutableList<String>, crime: String): MutableList<String> {

    crimeRecord.add(crime)

    when {
        crime.startsWith("murder") -> {
            crimeRecord.add("--> DANGEROUS CRIME: MURDER")
        }
        crime.startsWith("kidnapping") -> {
            crimeRecord.add("--> DANGEROUS CRIME: KIDNAPPING")
        }
        crime.startsWith("robbery") -> {
            crimeRecord.add("--> DANGEROUS CRIME: ROBBERY")
        }
        else -> {
            crimeRecord.add("--> MINOR CRIME")
        }
    }

    return crimeRecord
}