lift
Deprecated
This API is considered redundant. If this method is crucial for you, please let us know on the Arrow Github. Thanks! https://github.com/arrow-kt/arrow/issues Prefer explicitly creating lambdas
Replace with
{ it.map(f) }Content copied to clipboard
Lifts a function (B) -> C to the Either structure returning a polymorphic function that can be applied over all Either values in the shape of Either
import arrow.core.*
fun main(args: Array<String>) {
//sampleStart
val f = Either.lift<Int, CharSequence, String> { s: CharSequence -> "$s World" }
val either: Either<Int, CharSequence> = "Hello".right()
val result = f(either)
//sampleEnd
println(result)
}Content copied to clipboard
Deprecated
This API is considered redundant. If this method is crucial for you, please let us know on the Arrow Github. Thanks! https://github.com/arrow-kt/arrow/issues Prefer explicitly creating lambdas
Replace with
{ it.bimap(fa, fb) }Content copied to clipboard