Hi all, I'm trying to follow the Rx2 Docs at <http...
# arrow
m
Hi all, I'm trying to follow the Rx2 Docs at https://arrow-kt.io/docs/integrations/rx2/# but am having trouble. The docs setup a function as follows:
Copy code
fun <F> getSongUrlAsync(MS: MonadDefer<F>) =
  MS { getSongUrl() }
but this doesn't compile for me, i'm getting (on a similar function) - see below What am I doing wrong, or are the docs wrong? I'm a bit lost tbh The type import for MonadDefer is
arrow.fx.typeclasses.MonadDefer
a
Hi Mark! I belive you can use
later
for that
the docs seem to be outdated, if you would like to create a PR for that it would be an easy one 🙂
m
Thanks Alberto, but I can't fix it as I have no idea what you mean by use delay. I'm a beginner at arrow, trying to replace some Rx code we have with something simpler, and am trying to get even the simplest of examples from your docs working, and failing.
a
not your fault, the docs are simply outdated, you should be able to do:
MS.later { }
i believe
feel free to ask if you have any further questions, we're happy to help
m
it's in a couple of places in the docs. Also in https://arrow-kt.io/docs/effects/monaddefer/ same error. Thanks for help, i'll be back...
👍 1
r
This looks like a reference to the old invoke once again in place that is not using ank. I think from now on we should stop all contributions that provide docs that do not type check. If
getSongUrl
returns a Kinded value like IO or whatever then you want to use defer vs later. In whatever case that doc page is all wrong. Here are the actual combinators https://arrow-kt.io/docs/apidocs/arrow-fx/arrow.fx.typeclasses/-monad-defer/index.html#monaddefer
@Mark Fisher If you wish to help us fix it feel free to send a PR for those docs that uses the right API and it’s type checked inside
:kotlin:ank
blocks