arrow-core / arrow.core.extensions.andthen.functor / lift
@JvmName("lift") fun <X, A, B> ~~lift~~(arg0: (A) -> B): (Kind<Kind<ForAndThen, X>, A>) -> Kind<Kind<ForAndThen, X>, B>
Deprecated: AndThen
is deprecated in favor of the function andThen
used to provide stack safe function composition.
Lifts a function A -> B
to the F structure returning a polymorphic function
that can be applied over all F values in the shape of Kind<F, A>
A -> B -> Kind<F, A> -> Kind<F, B>
import arrow.core.*
import arrow.core.extensions.andthen.functor.*
import arrow.core.*
import arrow.core.extensions.andthen.applicative.just
fun main(args: Array<String>) {
val result =
//sampleStart
lift<String, String, String>({ s: CharSequence -> "$s World" })("Hello".just<String, String>())
//sampleEnd
println(result)
}
Do you like Arrow?
✖