fs2 icon indicating copy to clipboard operation
fs2 copied to clipboard

Topic trait as a combination of TopicSource and TopicSink?

Open ValdemarGr opened this issue 4 years ago • 0 comments

cats.effect.std.Queue defines the Queue trait as being a combination of Source and Sink, such that the caller has the possibility of using map or contramap. fs.concurrent.Topic only implements imap. Since not all functions are invertible, an improvement to Topic may be to compose the trait in a similar way?

Thank you.

Reference: https://github.com/typelevel/cats-effect/blob/854dc9ed20dcc211527cf084a05776681ad6324b/std/shared/src/main/scala/cats/effect/std/Queue.scala#L335-L407

ValdemarGr avatar Nov 29 '21 18:11 ValdemarGr