Skip to content

Commit

Permalink
Merge pull request #2860 from bplommer/invariantops-doc
Browse files Browse the repository at this point in the history
Improve description of InvariantOps
  • Loading branch information
mpilquist authored Mar 29, 2022
2 parents 652b021 + b4f52a8 commit 5f69848
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/shared/src/main/scala/fs2/Stream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3790,7 +3790,10 @@ object Stream extends StreamLowPriority {
)(s)
.stream

/** Provides syntax for streams that are invariant in `F` and `O`. */
/** A view of `Stream` that removes the variance from the type parameters. This allows
* defining syntax in which the type parameters appear in contravariant (i.e. input)
* position, which would fail to compile if defined as instance methods.
*/
implicit final class InvariantOps[F[_], O](private val self: Stream[F, O]) extends AnyVal {

/** Lifts this stream to the specified effect type.
Expand Down

0 comments on commit 5f69848

Please sign in to comment.