div

open operator fun <Context : Any, Root, Child> Value<Context, Root>.div(field: Field<Root, Child>): Value<Context, Child>(source)
open operator fun <Context : Any, Root, Child> Value<Context, Root>.div(field: KProperty1<Root, Child>): Value<Context, Child>(source)

Refers to field as a nested field of the current value.

Examples

class User(
val name: String,
)

class Data(
val users: List<User>,
val userNames: List<Int>,
)

data.aggregate()
.set {
Data::userNames set Data::users.map { it / User::name }
}

External resources