pakoito
04/22/2018, 12:03 PMarrow.syntax.tuples.plus
-> Tuple2.monoid().run { t1 + t2 }
jtonic
04/23/2018, 5:12 AMval a1 = 1 toT "one"
val val1 = "1. one"
val a2: Tuple3<Int, String, String> = Tuple2.monad().run { a1 + val1 }
and got the following compilation error.
Error:(27, 54) Kotlin: Type inference failed: Not enough information to infer parameter F in fun <F> Tuple2.Companion.monad(MF: Monoid<F>, dummy: Unit = ...): Tuple2MonadInstance<F>
Please specify it explicitly.
Thank you in advance for further explanationspakoito
04/23/2018, 9:25 AMval val1 = "1. one"
that’s not a tuplepakoito
04/23/2018, 9:25 AMpakoito
04/23/2018, 9:26 AMjtonic
04/23/2018, 5:10 PMoperator fun Tuple2<A,B>.plus(c: C): Tuple3<A,B,C> {...}
This is not important for my project, I’ve just put in in a test when I read the book, and when I bump the arrow version to 0.7.0, I noticed it went away, and code didn’t compile any longer. And I was wondering if:
1. it was moved in another package (arrow lib).
2. it didn’t comply with the FP and was removed all together.
Kind regards,pakoito
04/23/2018, 5:15 PMjtonic
04/23/2018, 5:26 PMjtonic
04/23/2018, 5:34 PM