toSmall
fun <S : Any, D : Any> MaterializedSnapshot<S>.toSmall(materialize: (S) -> D): SmallMaterializedSnapshot<D>
Converts a materialized snapshot into a simplified snapshot form. This function is used to transform a full snapshot into a simplified snapshot with transformed state.
Return
Returns a transformed simplified materialized snapshot.
Parameters
S
The state type of the original snapshot.
D
The state type of the transformed snapshot.
materialize
A function that transforms the original state into a new state.