-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
RxScala: Let's add Monad and Applicative instance #1167
Comments
I also find |
@zsxwing Yeah, Thanks for pointing out what is missing. Let's list them! |
Regarding foreach: It is blocking, so it's not in Observable, but in BlockingObservable. Theoretically, it would also be possible to make a non-blocking foreach, but in C# and Java, it's blocking, and I think it wouldn't be a good idea to change the semantics. |
@samuelgruetter Thanks for pointing out semantic gap issue. I agree with your opinion. I will add type class instances which preserve So, which is better do you think?? May I add a dependency to |
I'd say do another project, the goal is to try tokeepthe core of Rx (all flavored) lean and mean, and let people to chose if they want additional stuff.and no depend cries on Scalaz. KISS. |
@headinthebox Thanks! |
Hi folks,
As I showed in my repo everpeace/observable-canbe-monad,
Observable
can be monad(List like) and applicative functor(ZipList like).As functional programming community proved, monadic computation gives us really powerful syntax for composing, transforming them. I know
Observable
already provides many useful combinators. However, providing monad/applicative instance could provide more powerful and intuitive syntax about composing/transformingObservable
to users like below. And, some useful operators provided by scalaz can be used (e.g.^
operator).Then, I would be happy if I could hear opinions from RxScala contributors.
rx.lang.scala.scalaz
package inlanguage-adaptors/rxjava-scala
, orrxjava-scalaz
inrxjava-contrib
directory.The text was updated successfully, but these errors were encountered: