/**
 * Creates a list of equations based on a given condition.
 *
 * @param equation The equation to be evaluated.
 * @param condition The condition to determine if the equation should be included in the list.
 * @return A list of equations that satisfy the given condition.
 *
 * Example:
 * createEquationList("x + 2", true) -> ["x + 2"]
 * createEquationList("2 * y", false) -> []
 */
fun createEquationList(equation: String, condition: Boolean): List<String> {

    // Use list comprehension and the intersection of creating a list and an alternative to ternary operator
    val equationList = if (condition) {
        listOf(equation)
    } else {
        listOf()
    } // If condition is true, include the equation in the list; otherwise, include an empty list

    return equationList
}
/**
 * Creates a list of equations based on a given condition.
 *
 * @param equation The equation to be evaluated.
 * @param condition The condition to determine if the equation should be included in the list.
 * @return A list of equations that satisfy the given condition.
 *
 * Example:
 * createEquationList("x + 2", true) -> ["x + 2"]
 * createEquationList("2 * y", false) -> []
 */
fun createEquationList(equation: String, condition: Boolean): List<String> {
/**
 * Creates a list of equations based on a given condition.
 *
 * @param equation The equation to be evaluated.
 * @param condition The condition to determine if the equation should be included in the list.
 * @return A list of equations that satisfy the given condition.
 *
 * Example:
 * createEquationList("x + 2", true) -> ["x + 2"]
 * createEquationList("2 * y", false) -> []
 */
fun createEquationList(equation: String, condition: Boolean): List<String> {

    // Use list comprehension and the intersection of creating a list and an alternative to ternary operator
    val equationList = if (condition) {
        listOf(equation)
    } else {
        listOf()
    } // If condition is true, include the equation in the list; otherwise, include an empty list

    return equationList
}