Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
cats
:
Мова контенту: English
Русский
What will be the result of applying function combine for semigroup of functions Int => Int? import cats.implicits._ import cats.kernel.Semigroup Semigroup[Int => Int].combine(_ + 1, _ * 10).apply(6)
cats
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)
cats
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))
cats
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))
cats
What will be the result of applying function combine for options, one of which is empty? import cats.implicits._ import cats.kernel.Semigroup Semigroup[Option[Int]].combine(Option(1), None)
cats
What will be the result of combining Semigroup of type Map with the same keys? import cats.implicits._ import cats.kernel.Semigroup val aMap = Map("foo" → Map("bar" → 5)) val anotherMap = Map("foo" → Map("bar" → 6)) val combinedMap = Semigroup[Map[String, Map[String, Int]]].combine(aMap, anotherMap) combinedMap.get("foo")
cats
What will be the result of combineAll for the following Monoid? import cats.implicits._ import cats.kernel.Monoid Monoid[String].combineAll(List())
cats
What will be the result of combining Strings for a Monoid? import cats.implicits._ import cats.kernel.Monoid Monoid[String].combineAll(List("a", "b", "c"))
cats
What will be the result of executing foldMap on List of Ints with identity function? val l = List(1, 2, 3, 4, 5) l.foldMap(identity)
cats
What will be the result of executing foldMap on List of Ints with toString function? val l = List(1, 2, 3, 4, 5) l.foldMap(i => i.toString)
cats
← Попередня
1
2
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести