Ifvwm
07/20/2021, 10:35 AMfun parseIntEither(s: String): Either<NumberFormatException, Int> =
if (s.matches(Regex("-?[0-9]+"))) Either.Right(s.toInt())
else Either.Left(NumberFormatException("$s is not a valid integer."))
val list = listOf("1", "2", "3").k().traverse(Either.applicative(), ::parseIntEither)
val failFastList = listOf("1", "abc", "3", "4s").k().traverse(Either.applicative(), ::parseIntEither)
red line under Either.applicative(),
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6
I can't find a solution on IDEA, but it's ok on Android Studio, and IDEA using the same JDK 1.8 from Android Studio
CLOVIS
07/20/2021, 12:19 PMIfvwm
07/21/2021, 1:49 AMCLOVIS
07/21/2021, 8:40 AMIfvwm
07/21/2021, 10:28 AM