vejeta
10/24/2018, 2:13 AMval listOfValidNumbers= listOf(1, 2, 3).k()
val sequencedEitherResult = listOfValidNumbers.sequence(
Either.applicative(),
{ element: Any -> parseIntEither(element.toString())}
)
Error:(157, 52) Kotlin: None of the following functions can be called with the arguments supplied:
public fun <F, G, A, B> EitherTOf<???, ???, Kind<???, ???>> /* = Kind<Kind2<[ERROR : Unknown type parameter 4], [ERROR : Unknown type parameter 5], [ERROR : Unknown type parameter 6]> /* = Kind<Kind<ForEitherT, ???>, ???> */, Kind<???, ???>> */.sequence(FF: Traverse<???>, GA: Applicative<???>): Kind<???, EitherT<???, ???, ???>> defined in arrow.instances
public fun <F, G, A> OptionTOf<???, Kind<???, ???>> /* = Kind<Kind<ForOptionT, ???>, Kind<???, ???>> */.sequence(FF: Traverse<???>, GA: Applicative<???>): Kind<???, OptionT<???, ???>> defined in arrow.instances
If I use traverse, instead of sequence, it compiles fine, but I wanted to test sequence. What am I missing?