arrow-fx-rx2 / arrow.fx.rx2.extensions.singlek.functor / lift


@JvmName("lift") fun <A, B> lift(arg0: (A) -> B): (Kind<ForSingleK, A>) -> Kind<ForSingleK, B>

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.fx.rx2.*
import arrow.fx.rx2.extensions.singlek.functor.*
import arrow.core.*

import arrow.fx.rx2.extensions.singlek.applicative.just

fun main(args: Array<String>) {
  val result =
  lift({ s: CharSequence -> "$s World" })("Hello".just())