[utils] Introduce the bind function and use it throughout

This commit is contained in:
Sergej Jaskiewicz
2023-11-22 14:37:09 +01:00
committed by Space Team
parent 93563d7c80
commit f844a86057
24 changed files with 31 additions and 43 deletions
@@ -65,8 +65,6 @@ operator fun <K, V, U> Map<K, Map<V, U>>.get(k1: K, k2: V): U {
return getValue(k1).getValue(k2)
}
fun <T1, T2, T3, R> ((T1, T2, T3) -> R).bind(t3: T3): ((T1, T2) -> R) = { t1, t2 -> invoke(t1, t2, t3) }
internal fun <Field : AbstractField<*>> List<Field>.reorderFieldsIfNecessary(order: List<String>?): List<Field> =
if (order == null) {
this