Skip to content

Commit

Permalink
Merge pull request #3375 from He-Pin/patch-1
Browse files Browse the repository at this point in the history
chore: Use ev directly in flatten.
  • Loading branch information
mpilquist authored Jan 18, 2024
2 parents 70c754d + 905cbbd commit 0898b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/fs2/Stream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ final class Stream[+F[_], +O] private[fs2] (private[fs2] val underlying: Pull[F,
* See `parJoin` and `parJoinUnbounded` for concurrent flattening of 'n' streams.
*/
def flatten[F2[x] >: F[x], O2](implicit ev: O <:< Stream[F2, O2]): Stream[F2, O2] =
flatMap(i => ev(i))
flatMap(ev)

/** Folds all inputs using an initial value `z` and supplied binary operator,
* and emits a single element stream.
Expand Down

0 comments on commit 0898b90

Please sign in to comment.