Skip to content

Commit

Permalink
add mix
Browse files Browse the repository at this point in the history
  • Loading branch information
halotukozak authored Jan 17, 2024
1 parent 33913c4 commit 14d4ab5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/shared/FlowUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ fun <K, V> Flow<Pair<K, V>>.group(): Flow<Pair<K, List<V>>> = flow {//todo idk i
storage.forEach { (k, ts) -> emit(k to ts) }
}

inline fun <reified T> mix(vararg flows: Flow<T>): Flow<Array<T>> = combine(*flows) { it }

val Flow<Boolean>.not
get() = map { !it }
get() = map { !it }

0 comments on commit 14d4ab5

Please sign in to comment.