traverse with the identity reverses the nested typ...
# arrow
r
traverse with the identity reverses the nested type constructors. It's expressed in
Foldable
and if that
Optional
was
arrow.core.Option
this is what it would look like:
Copy code
import arrow.*
import arrow.core.*
import arrow.data.*
import arrow.syntax.option.*

val input: List<Option<Int>> = listOf(1.some())
val output: Option<List<Int>> = input.k().traverse(::identity, Option.applicative()).list