/**
 * This function takes a list of historical events, an index position, and a new value. It subtracts the new value from the element at the given index position in the list, and returns the modified list.
 *
 * @param historyList A list of historical events.
 * @param index The index position of the element to modify.
 * @param value The value to be subtracted from the element.
 * @return The modified list after subtracting the value from the specified element.
 */
fun modifyList(historyList: MutableList<Int>, index: Int, value: Int): MutableList<Int> {

    // Subtract the value from the element at the given index position in the list
    historyList[index] -= value
    return historyList
}
/**
 * This function takes a list of historical events, an index position, and a new value. It subtracts the new value from the element at the given index position in the list, and returns the modified list.
 *
 * @param historyList A list of historical events.
 * @param index The index position of the element to modify.
 * @param value The value to be subtracted from the element.
 * @return The modified list after subtracting the value from the specified element.
 */
fun modifyList(historyList: MutableList<Int>, index: Int, value: Int): MutableList<Int> {
/**
 * This function takes a list of historical events, an index position, and a new value. It subtracts the new value from the element at the given index position in the list, and returns the modified list.
 *
 * @param historyList A list of historical events.
 * @param index The index position of the element to modify.
 * @param value The value to be subtracted from the element.
 * @return The modified list after subtracting the value from the specified element.
 */
fun modifyList(historyList: MutableList<Int>, index: Int, value: Int): MutableList<Int> {

    // Subtract the value from the element at the given index position in the list
    historyList[index] -= value
    return historyList
}