Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some polymorphic methods for Observable #941

Merged
merged 6 commits into from Jul 3, 2019

Conversation

@entangled90
Copy link
Contributor

commented Jul 2, 2019

Added some polymorphic methods for types which are TaskLike or TaskLift.
Let me know if someone is interested in other methods.
I did not find additional test for existing polymorphic variants of methods, therefore I didn't add any test.

Issue: #914

@entangled90 entangled90 changed the title Added some polymorphic methods for Observable #914 Added some polymorphic methods for Observable Jul 2, 2019

@@ -4479,6 +4561,20 @@ object Observable extends ObservableDeprecatedBuilders {
def fromIterator[A](resource: Resource[Task, Iterator[A]]): Observable[A] =
Observable.fromResource(resource).flatMap(fromIteratorUnsafe)

/** Version of [[fromIterator]] that can work with generic

This comment has been minimized.

Copy link
@Avasil

Avasil Jul 2, 2019

Collaborator

I think you need to use [[fromIterator[A](task* fromIterator(task)]] or just fromIterator to successfully generate doc (currently it fails because of ambiguity)

This comment has been minimized.

Copy link
@entangled90

entangled90 Jul 3, 2019

Author Contributor

Removed the scaladoc link, considering the other method is just a few lines above.

* - `scala.concurrent.Future`
* - ...
*/
final def consumeWithF[R, F[_]](f: Consumer[A, R])(implicit F: TaskLift[F]): F[R] =

This comment has been minimized.

Copy link
@Avasil

Avasil Jul 3, 2019

Collaborator

Sorry for not noticing right away, the convention is to have F[_] first
Otherwise looks great :D

Carlo Sana added 2 commits Jul 3, 2019
entangled90 and others added 2 commits Jul 3, 2019
Update monix-reactive/shared/src/main/scala/monix/reactive/Observable…
….scala

Co-Authored-By: Piotr Gawryś <pgawrys2@gmail.com>
Update monix-reactive/shared/src/main/scala/monix/reactive/Observable…
….scala

Co-Authored-By: Piotr Gawryś <pgawrys2@gmail.com>
@Avasil
Avasil approved these changes Jul 3, 2019
@Avasil

This comment has been minimized.

Copy link
Collaborator

commented Jul 3, 2019

Thank you @entangled90 :)

@Avasil Avasil merged commit eb864ec into monix:master Jul 3, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@entangled90 entangled90 deleted the entangled90:feature-polymorphic-observable branch Jul 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.