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
Feature request: Flatmap #49
Comments
PS: While I'm at it, it would also be very nice to have |
Also, as a more general question: I can't help but notice that the majority of ReactiveX functions are still missing. What is the plan to get them all in? I'd love to contribute a few, but I don't know if I should create a PR for each one. I don't want to flood this project with issues and PRs. Also what is the purpose of the |
@pierrebeaucamp thanks for your help. I kept telling people how I started RxGo as an experiment and then it just took off. I've been away on a Go sabbatical working on languages like Ocaml and JavaScript, and now I'm back to work. There are a few things that will need overhaul, and it'd be great to get some longer-term helping hand. I'm closing this, but if you would like to take it from here I could email you. |
Also just looking at your example there's already a new function alias |
I've a plan to make a pull request. Which branch should I use as the starting point - dev or master? |
@venth are you implementing FlatMap? |
Yes. I have a plan to make it on goroutines. I wondered, if I shall introduce TestSubscriber/Observer first |
@jochasinga, I have doubts related to current operators implementation. Currently operators like:
perform iteration through channel. I've compared it to other reactivex implementations. Others implementations like: Scala based, Java based are relaying on reactor pattern and functional programming. In current implementation instead of applying observer pattern I see iteration through values in a channel. Did I understand it correctly or I didn't get something? |
@jochasinga, it took me a while and few tries to grasp the idea of flatmap implementation. I prepared the version based observer and subscription without usage of channels (https://github.com/venth/gorx/blob/master/operator/flatmap_observable.go) and have an idea how to deliver flatmap implementation consistent to the channel based approach. |
As per contribution guidelines, I'm opening an issue for discussion regarding the implementation of Flatmap.
Per Documentation:
A naive implementation could look like
I see that the
dev
branch has aMerge
function, however I'm not sure how to exploit the underlyingreflect.SelecCase
with a dynamic number of Observables. Creating a subscriber (and a go routine) for each element seems sub-optimal, but out of the top of my head I'm not aware of a different solution.I'd be happy to submit a PR once agreement of the implementation is reached.
The text was updated successfully, but these errors were encountered: