no, but you can do it like this : ```fun <A>...
# arrow-contributors
s
no, but you can do it like this :
Copy code
fun <A> Validated<NonEmptyList<YourType>, A>.toIO(): IO<A> {
    return when (this) {
        is Valid -> this.a.just()
        is Invalid -> YourErrorType(this.e).raiseError()
    }
}
👏🏼 1
🔝 2
a
right, or also you can call
toEither()
and then
toIO()
, but I was asking because, shouldn’t it be one? I am in to contribute if people think that makes sense for the library
p
Not for Validated in particular. Either makes sense for the suspend functions that return Either for errors are frequent.