arrow-core / arrow.core.extensions.const.functor / arrow.Kind / map
@JvmName("map") fun <A, B> Kind<Kind<ForConst, A>, A>.~~map~~(arg1: (A) -> B): Const<A, B>
Deprecated: @extension kinded projected functions are deprecated
Transform the F wrapped value A into B preserving the F structure Kind<F, A> -> Kind<F, B>
import arrow.core.*
import arrow.core.extensions.const.functor.*
import arrow.core.*
import arrow.core.extensions.const.applicative.just
import arrow.core.extensions.monoid
fun main(args: Array<String>) {
val result =
//sampleStart
"Hello".just<String>(String.monoid()).map<String, String>({ "$it World" })
//sampleEnd
println(result)
}
Do you like Arrow?
✖