1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 23:29:33 +00:00

add waitCommands* expectations

This commit is contained in:
2022-08-24 15:03:54 +06:00
parent fff05a40d9
commit 9ea06de27c
5 changed files with 142 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ fun <T> Flow<Iterable<T>>.flatten(): Flow<T> = flow {
}
}
fun <T, R> Flow<T>.flatMap(mapper: (T) -> Iterable<R>): Flow<R> = flow {
fun <T, R> Flow<T>.flatMap(mapper: suspend (T) -> Iterable<R>): Flow<R> = flow {
collect {
mapper(it).forEach {
emit(it)