arrow-core / arrow.core.extensions.either.functor / arrow.Kind / fproduct
@JvmName("fproduct") fun <L, A, B> Kind<Kind<ForEither, L>, A>.~~fproduct~~(arg1: (A) -> B): Either<L, Tuple2<A, B>>
Deprecated: @extension kinded projected functions are deprecated
Applies f to an A inside F and returns the F structure with a tuple of the A value and the computed B value as result of applying f
Kind<F, A> -> Kind<F, Tuple2<A, B>>
import arrow.core.*
import arrow.core.extensions.either.functor.*
import arrow.core.*
import arrow.core.extensions.either.applicative.just
fun main(args: Array<String>) {
val result =
//sampleStart
"Hello".just<String, String>().fproduct<String, String, String>({ "$it World" })
//sampleEnd
println(result)
}
Do you like Arrow?
✖