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

Semigroup[Int].combine(1, 2)
Explanation
For Semigroup[Int] combine function is defined as sum:
def combine(x: Int, y: Int): Int = x + y

Source: Scala Exercises: cats semigroup

Follow CodeGalaxy

Mobile Beta

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