map

fun <O> map(mapper: (T) -> O): KVal<O>(source)

Create another KVal that is a mapping of this KVal. The mapping function will be called whenever this KVal changes, and the new KVal will be updated with the result of the mapping function.

For bi-directional mappings, see KVar.map.