arrow-core / arrow.core.extensions.option.functor / lift
@JvmName("lift") fun <A, B> ~~lift~~(arg0: (A) -> B): (Kind<ForOption, A>) -> Kind<ForOption, B>
Deprecated: @extension kinded projected functions are deprecated
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.extensions.option.applicative.just
import arrow.core.extensions.option.functor.lift
fun main(args: Array<String>) {
val result =
//sampleStart
lift({ s: CharSequence -> "$s World" })("Hello".just())
//sampleEnd
println(result)
}
Do you like Arrow?
✖