arrow-core / arrow.core.extensions.tuple2.functor / arrow.Kind / fproduct
@JvmName("fproduct") fun <F, A, B> Kind<Kind<ForTuple2, F>, A>.~~fproduct~~(arg1: (A) -> B): Tuple2<F, 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.tuple2.functor.*
import arrow.core.*
import arrow.core.extensions.tuple2.applicative.just
import arrow.core.extensions.monoid
fun main(args: Array<String>) {
val result =
//sampleStart
"Hello".just<String, String>(String.monoid()).fproduct<String, String, String>({ "$it World" })
//sampleEnd
println(result)
}
Do you like Arrow?
✖