What will be the result of combineAll for the following Monoid?
import cats.implicits._
import cats.kernel.Monoid

Function combineAll can take List as a parameter. In current example, it is an empty list. Since Monoid is of type String, the combine is done for empty list of Strings that returns a zero value, which is an empty String.

Source: Scala Exercises: cats monoid

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Scala
Зарегистрируйся сейчас
или Подпишись на будущие тесты