What will be the result of applying function combine for semigroup of type List[Int]?
import cats.implicits._
import cats.kernel.Semigroup

Semigroup[List[Int]].combine(List(1, 2, 3), List(4, 5, 6))
Explanation
Function combine for Semigroup[List[Int]] is defined as a concatenation of lists:
def combine(x: List[A], y: List[A]): List[A] = x ::: y

Source: Scala Exercises: cats semigroup

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes