/**
 * This function takes in a list of boolean values and a boolean condition, and returns a list of indexes where the condition is true.
 *
 * @param data A list of boolean values.
 * @param condition A boolean condition.
 * @return A list of indexes where the condition is true.
 *
 * Example:
 * getBooleanIndexes(listOf(true, false, true, true, false), true) // Output: [0, 2, 3]
 */
fun getBooleanIndexes(data: List<Boolean>, condition: Boolean): List<Int> {

    val indexes = mutableListOf<Int>()

    data.forEachIndexed { index, value ->
        if (value == condition) {
            indexes.add(index)
        }
    }

    return indexes
}

// TESTING THE FUNCTION
/**
 * This function takes in a list of boolean values and a boolean condition, and returns a list of indexes where the condition is true.
 *
 * @param data A list of boolean values.
 * @param condition A boolean condition.
 * @return A list of indexes where the condition is true.
 *
 * Example:
 * getBooleanIndexes(listOf(true, false, true, true, false), true) // Output: [0, 2, 3]
 */
fun getBooleanIndexes(data: List<Boolean>, condition: Boolean): List<Int> {
/**
 * This function takes in a list of boolean values and a boolean condition, and returns a list of indexes where the condition is true.
 *
 * @param data A list of boolean values.
 * @param condition A boolean condition.
 * @return A list of indexes where the condition is true.
 *
 * Example:
 * getBooleanIndexes(listOf(true, false, true, true, false), true) // Output: [0, 2, 3]
 */
fun getBooleanIndexes(data: List<Boolean>, condition: Boolean): List<Int> {

    val indexes = mutableListOf<Int>()

    data.forEachIndexed { index, value ->
        if (value == condition) {
            indexes.add(index)
        }
    }

    return indexes
}

// TESTING THE FUNCTION