79292792

Date: 2024-12-18 23:52:00
Score: 3.5
Natty:
Report link

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))
}

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): What
  • Low reputation (1):
Posted by: LSAFER MEEMER