Skip to content

Conversation

OlivierBlanvillain
Copy link
Contributor

@OlivierBlanvillain OlivierBlanvillain commented Jun 25, 2016

This PR adds imap/map on fs2.async.mutable.{Queue,Signal,Topic}. The follow up would be to define the corresponding Invariant instances in fs2-cats/fs2-scalaz.

I'm not sure if I should test that with the invariant laws, bringing the ones from cats with an additional % "test" dep, or if you consider the type checker to be enough in that case...

functional-streams-for-scala/fs2-cats#6

@mpilquist
Copy link
Member

👍 Can we add imap to mutable.Signal too?

@OlivierBlanvillain
Copy link
Contributor Author

Like this?

@OlivierBlanvillain
Copy link
Contributor Author

Ah didn't even notice they where two Signals 😄. Actually, the immutable version already has ImmutableSignalSyntax which give it a map, so I reverted my changes in that file.

(Note that because of inheritance it would be weird to have map define on immutable.Signal, as it would expose both map and imap on the mutable version with different return types.)

@mpilquist mpilquist merged commit 226c3c2 into typelevel:series/0.9 Jun 27, 2016
@OlivierBlanvillain OlivierBlanvillain deleted the imap branch August 23, 2016 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants