Updated on 2026-08-14

This commit is contained in:
Tangem 2023-05-10 21:59:08 +08:00
parent 4492eb0de0
commit 5e83a5612f
4 changed files with 97 additions and 116 deletions

View file

@ -1,15 +1,5 @@
package com.tangem.tap.common.extensions
/**
[REDACTED_AUTHOR]
*/
fun <T> List<T>.containsAny(list: List<T>): Boolean {
this.forEach { mainItem ->
list.forEach { if (it == mainItem) return true }
}
return false
}
fun <T> MutableList<T>.removeBy(predicate: (T) -> Boolean): Boolean {
val toRemove = this.filter(predicate)
this.removeAll(toRemove)