Hello. I'm trying to write my first comprehension like this: ```Either.monad<Exception>().fx {...
m
Hello. I'm trying to write my first comprehension like this:
Copy code
Either.monad<Exception>().fx {

}
but the IDE says there is no
fx
. If I go to the definition of
Either.monad()
, I see that it returns a
EitherMonad<L>
, which has a definition for
fx
. What's happening? That is an attempt to adapt the code from your comprehension tutorial. If, instead, I'm supposed to use
Copy code
Either.monad<Any>().binding {

}
then the problem is that I don't thave any
binding
method around.
a
I believe you should be able to simply do
Either.fx { ... }
although i cannot check right now
👍 1
m
Thanks, Alberto. Yes,
fx
is an extension function on
Either.Companion
.
Thanks, Simon. This kind of answers helps building a deeper understanding of Arrow implementation details, while we are learning bits and pieces to integrate it in our projects.
👍 1
arrow 2
s
Always happy to help! 🙂