Packages

c

cats.syntax

UnorderedFoldableOps

final class UnorderedFoldableOps[F[_], A] extends AnyVal

Source
unorderedFoldable.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnorderedFoldableOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new UnorderedFoldableOps(fa: F[A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def count(p: (A) ⇒ Boolean)(implicit F: UnorderedFoldable[F]): Long

    Count the number of elements in the structure that satisfy the given predicate.

    Count the number of elements in the structure that satisfy the given predicate.

    For example:

    scala> import cats.implicits._
    scala> val map1 = Map[Int, String]()
    scala> val p1: String => Boolean = _.length > 0
    scala> map1.count(p1)
    res0: Long = 0
    
    scala> val map2 = Map(1 -> "hello", 2 -> "world", 3 -> "!")
    scala> val p2: String => Boolean = _.length > 1
    scala> map2.count(p2)
    res1: Long = 2
  6. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped