/**
 * This function takes a list of numbers, a start index, an end index, and a multiplier,
 * and modifies the elements in the specified slice by multiplying them with the multiplier.
 *
 * @param numbers A list of numbers
 * @param start The start index of the slice
 * @param end The end index of the slice
 * @param multiplier The value to multiply the slice elements with
 * @return The modified list with the slice elements multiplied by the multiplier
 */
fun multiplyListSlice(numbers: MutableList<Int>, start: Int, end: Int, multiplier: Int): List<Int> {

    // Use list slicing and multiplication assignment operator to solve the exercise
    numbers.subList(start, end).replaceAll { it * multiplier }
    
    return numbers
}
/**
 * This function takes a list of numbers, a start index, an end index, and a multiplier,
 * and modifies the elements in the specified slice by multiplying them with the multiplier.
 *
 * @param numbers A list of numbers
 * @param start The start index of the slice
 * @param end The end index of the slice
 * @param multiplier The value to multiply the slice elements with
 * @return The modified list with the slice elements multiplied by the multiplier
 */
fun multiplyListSlice(numbers: MutableList<Int>, start: Int, end: Int, multiplier: Int): List<Int> {
/**
 * This function takes a list of numbers, a start index, an end index, and a multiplier,
 * and modifies the elements in the specified slice by multiplying them with the multiplier.
 *
 * @param numbers A list of numbers
 * @param start The start index of the slice
 * @param end The end index of the slice
 * @param multiplier The value to multiply the slice elements with
 * @return The modified list with the slice elements multiplied by the multiplier
 */
fun multiplyListSlice(numbers: MutableList<Int>, start: Int, end: Int, multiplier: Int): List<Int> {

    // Use list slicing and multiplication assignment operator to solve the exercise
    numbers.subList(start, end).replaceAll { it * multiplier }
    
    return numbers
}