https://kotlinlang.org logo
#arrow
Title
l

Leandro Borges Ferreira

09/21/2018, 7:17 PM
Hi folks, I am trying to compose Functors. But I am having some hard time with the Nested interface. Shouldn't this work?
Copy code
val functor = ListK.functor().compose(Option.functor())

val lifted: (Kind<Nested<ForListK, ForOption>, Int>) -> (Kind<Nested<ForListK, ForOption>, Int>) =functor.lift(sumOne)

lifted(listOf(Option.just(1), Option.just(2)).k())