arrow-core / arrow.core.extensions.either.functor / arrow.Kind / widen
@JvmName("widen") fun <L, B, A : B> Kind<Kind<ForEither, L>, A>.~~widen~~(): Either<L, B>
Deprecated: @extension kinded projected functions are deprecated
Given A is a sub type of B, re-type this value from Kind<F, A> to Kind<F, B>
Kind<F, A> -> Kind<F, B>
import arrow.core.*
import arrow.core.extensions.either.functor.*
import arrow.core.*
import arrow.core.extensions.either.applicative.just
import arrow.Kind
fun main(args: Array<String>) {
val result: Kind<*, CharSequence> =
//sampleStart
"Hello".just<String, String>().map<String, String, String>({ "$it World" }).widen<String,
String, String>()
//sampleEnd
println(result)
}
Do you like Arrow?
✖