arrow-core / arrow.core.extensions.andthen.functor / arrow.Kind / mapConst
@JvmName("mapConst") fun <X, A, B> Kind<Kind<ForAndThen, X>, A>.~~mapConst~~(arg1: B): AndThen<X, B>
Deprecated: AndThen
is deprecated in favor of the function andThen
used to provide stack safe function composition.
Replaces A inside F with B resulting in a Kind<F, 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
"Hello World".just<String, String>().mapConst<String, String, String>("...")
//sampleEnd
println(result)
}
Do you like Arrow?
✖