/**
 * Given a list of elements, create a new list that contains only the elements that are equal to a given value.
 *
 * @param elements a list of elements
 * @param value the value to compare elements with
 * @return a new list containing only the elements that are equal to the given value
 *
 * Example:
 * createEqualList(listOf(1, 2, 3, 2, 4, 2, 5), 2) -> [2, 2, 2] because 2 is equal to the given value 2
 * createEqualList(listOf('a', 'b', 'a', 'c', 'd', 'a'), 'a') -> ['a', 'a', 'a'] because 'a' is equal to the given value 'a'
 */
fun createEqualList(elements: List<Any>, value: Any): List<Any> {

    val newList = elements.filter { it == value }
    return newList
}
/**
 * Given a list of elements, create a new list that contains only the elements that are equal to a given value.
 *
 * @param elements a list of elements
 * @param value the value to compare elements with
 * @return a new list containing only the elements that are equal to the given value
 *
 * Example:
 * createEqualList(listOf(1, 2, 3, 2, 4, 2, 5), 2) -> [2, 2, 2] because 2 is equal to the given value 2
 * createEqualList(listOf('a', 'b', 'a', 'c', 'd', 'a'), 'a') -> ['a', 'a', 'a'] because 'a' is equal to the given value 'a'
 */
fun createEqualList(elements: List<Any>, value: Any): List<Any> {
/**
 * Given a list of elements, create a new list that contains only the elements that are equal to a given value.
 *
 * @param elements a list of elements
 * @param value the value to compare elements with
 * @return a new list containing only the elements that are equal to the given value
 *
 * Example:
 * createEqualList(listOf(1, 2, 3, 2, 4, 2, 5), 2) -> [2, 2, 2] because 2 is equal to the given value 2
 * createEqualList(listOf('a', 'b', 'a', 'c', 'd', 'a'), 'a') -> ['a', 'a', 'a'] because 'a' is equal to the given value 'a'
 */
fun createEqualList(elements: List<Any>, value: Any): List<Any> {

    val newList = elements.filter { it == value }
    return newList
}