Alias for followedBy.
Alias for followedBy.
Sequentially compose two actions, discarding any value produced by the first.
Sequentially compose two actions, discarding any value produced by the first.
Sequentially compose two actions, discarding any value produced by the first. This variant of followedBy also lets you define the evaluation strategy of the second action. For instance you can evaluate it only after the first action has finished:
scala> import cats.Eval scala> import cats.std.option._ scala> import cats.syntax.flatMap._ scala> val fa: Option[Int] = Some(3) scala> def fb: Option[String] = Some("foo") scala> fa.followedByEval(Eval.later(fb)) res0: Option[String] = Some(foo)
Pair A
with the result of function application.
Pair A
with the result of function application.
Example:
scala> import cats.std.list._ scala> import cats.syntax.flatMap._ scala> List("12", "34", "56").mproduct(_.toList) res0: List[(String, Char)] = List((12,1), (12,2), (34,3), (34,4), (56,5), (56,6))