arrow-core / arrow.core.extensions.eval.functor / arrow.Kind / fproduct

fproduct

@JvmName("fproduct") fun <A, B> Kind<ForEval, A>.~~fproduct~~(arg1: (A) -> B): Eval<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.eval.functor.*
import arrow.core.*


 import arrow.core.extensions.eval.applicative.just

 fun main(args: Array<String>) {
  val result =
  //sampleStart
  "Hello".just().fproduct({ "$it World" })
  //sampleEnd
  println(result)
 }

Do you like Arrow?

Arrow Org
<