fs2
fs2 copied to clipboard
Topic trait as a combination of TopicSource and TopicSink?
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