/**
 * Given a list of values and a threshold, this function deletes all elements greater than or equal to the threshold.
 *
 * @param lst The list of values.
 * @param threshold The threshold value.
 * @return The modified list with elements less than the threshold.
 */
fun deleteGreaterOrEqualValues(lst: MutableList<Double>, threshold: Double): MutableList<Double> {

    // Create a copy of the list to avoid modifying the original list
    val result = lst.toMutableList()
    
    // Iterate over the values in the list
    val iterator = result.iterator()
    while (iterator.hasNext()) {
        val value = iterator.next()
        // Check if the value is greater than or equal to the threshold
        if (value >= threshold) {
            // Remove the value from the list
            iterator.remove()
        }
    }
    
    return result
}
/**
 * Given a list of values and a threshold, this function deletes all elements greater than or equal to the threshold.
 *
 * @param lst The list of values.
 * @param threshold The threshold value.
 * @return The modified list with elements less than the threshold.
 */
fun deleteGreaterOrEqualValues(lst: MutableList<Double>, threshold: Double): MutableList<Double> {
/**
 * Given a list of values and a threshold, this function deletes all elements greater than or equal to the threshold.
 *
 * @param lst The list of values.
 * @param threshold The threshold value.
 * @return The modified list with elements less than the threshold.
 */
fun deleteGreaterOrEqualValues(lst: MutableList<Double>, threshold: Double): MutableList<Double> {

    // Create a copy of the list to avoid modifying the original list
    val result = lst.toMutableList()
    
    // Iterate over the values in the list
    val iterator = result.iterator()
    while (iterator.hasNext()) {
        val value = iterator.next()
        // Check if the value is greater than or equal to the threshold
        if (value >= threshold) {
            // Remove the value from the list
            iterator.remove()
        }
    }
    
    return result
}