What will be the result of applying combine to semigroup of type Option[Int]]
import cats.implicits._
import cats.kernel.Semigroup

Semigroup[Option[Int]].combine(Option(1), Option(2))
Explanation
Since both Options are non-empty, the combine function of Semigroup[Int] is applied, which is sum of Ints.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Scala
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести