Skip to content

Commit

Permalink
Fix docs for filter. (#2555)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjohndoe authored Mar 16, 2021
1 parent 187f0aa commit 25a33d4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import kotlinx.coroutines.flow.internal.unsafeFlow as flow
import kotlinx.coroutines.flow.unsafeTransform as transform

/**
* Returns a flow containing only values of the original flow that matches the given [predicate].
* Returns a flow containing only values of the original flow that match the given [predicate].
*/
public inline fun <T> Flow<T>.filter(crossinline predicate: suspend (T) -> Boolean): Flow<T> = transform { value ->
if (predicate(value)) return@transform emit(value)
Expand Down

0 comments on commit 25a33d4

Please sign in to comment.