Hello all. I'm trying out arrow and my first (and ...
# arrow
p
Hello all. I'm trying out arrow and my first (and only for now) goal is to have business logic agnostic to the "container" type (Option, Future, CompletionStage, Observable, etc...) which from what I've read is where Arrow shines. I have a sample (public) repo where I'm attempting to get a simple example compiling and working. So far I would like to have my
F
parameterized to
CompletionStage
and I still can't quite get there. Is there anyone here who might be able to help? So far I've tried to implement
interface CompletionStageMonad : Monad<ForCompletionStage> {
(
ForCompletionStage
was created by me) but the signature the IDE generates for
flatMap
(and the only that compiles) is:
Copy code
override fun <A, B> Kind<ForCompletionStage, A>.flatMap(f: (A) -> Kind<ForCompletionStage, B>): Kind<ForCompletionStage, B> {
I was expecting it to be:
Copy code
override fun <A, B> Kind<ForCompletionStage, A>.flatMap(f: (A) -> Kind<ForCompletionStage, B>): CompletionStage<B> {
Without the
Kind<...>
in the return type