What about this?
fun <T, R> StateFlow<T>.mapStateIn(
scope: CoroutineScope,
block: (T) -> R,
): StateFlow<R> {
val started: SharingStarted = SharingStarted.Eagerly
return drop(1).map { block(it) }
.stateIn(scope, started, block(value))
}