Тесты
Язык сайта: Русский
Українська
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
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты