[+] AimeDB client

This commit is contained in:
Azalea
2025-03-10 12:57:23 -04:00
parent af734b7814
commit c3963e7fe2
4 changed files with 66 additions and 6 deletions

View File

@@ -192,8 +192,7 @@ val Any?.str get() = toString()
// Collections
fun <T> ls(vararg args: T) = args.toList()
inline fun <reified T> arr(vararg args: T) = arrayOf(*args)
operator fun <K, V> Map<K, V>.plus(map: Map<K, V>) =
(if (this is MutableMap) this else mut).apply { putAll(map) }
operator fun <K, V> Map<K, V>.plus(map: Map<K, V>) = mut.apply { putAll(map) }
operator fun <K, V> MutableMap<K, V>.plusAssign(map: Map<K, V>) { putAll(map) }
fun <K, V: Any> Map<K, V?>.vNotNull(): Map<K, V> = filterValues { it != null }.mapValues { it.value!! }
fun <T> MutableList<T>.popAll(list: List<T>) = list.also { removeAll(it) }