<@U0AAQKT9Q> Thank you! World is fine again, that'...
# announcements
g
@ilya.gorbunov Thank you! World is fine again, that's exactly what I was looking for. Some other, less elegant ideas 1.
Copy code
.plus(if (conditon) foo else emptyList() )
2.
Copy code
.plusIf(foo) { condition } // not sure if readable enough

inline fun <T> Iterable<T>.plusIf(element: T, predicate: (T) -> Boolean) {
    if (predicate.invoke(element)) {
        plus(element)
    }
}