UnorderedFoldable
trait UnorderedFoldable[t: Type -> Type]SourceA trait for unordered data structures that can be folded.
Associated Types
type Aef: EffSourceThe associated effect of the UnorderedFoldable which represents the effect of accessing its elements.
Instances
instance UnorderedFoldable[Chain]Sourceinstance UnorderedFoldable[DelayList]Sourceinstance UnorderedFoldable[Identity]Sourceinstance UnorderedFoldable[List]Sourceinstance UnorderedFoldable[Map[k]]Sourceinstance UnorderedFoldable[MultiMap[k]]Sourceinstance UnorderedFoldable[Nec]Sourceinstance UnorderedFoldable[Nel]Sourceinstance UnorderedFoldable[Option]Sourceinstance UnorderedFoldable[RedBlackTree[k]]Sourceinstance UnorderedFoldable[Set]Sourceinstance UnorderedFoldable[Vector]SourceSignatures
def foldMap(f: a -> b \ ef, t: t[a]): b \ ef + Aef[t] with UnorderedFoldable[t], CommutativeMonoid[b]
 SourceUnordered fold of t.
Applies f to all elements in t and combines the results
i.e. CommutativeMonoid.combine(f(a)) for all a in t.
Trait Definitions
def count(f: a -> Bool \ ef, t: t[a]): Int32 \ ef + Aef[t] with UnorderedFoldable[t]
 SourceReturns the number of elements in t that satisfy the predicate f.
def exists(f: a -> Bool \ ef, t: t[a]): Bool \ ef + Aef[t] with UnorderedFoldable[t]
 SourceReturns true if and only if at least one element in t satisfies the predicate f.
Returns false if t is empty.
def fold(t: t[a]): a \ Aef[t] with UnorderedFoldable[t], CommutativeMonoid[a]
 SourceReturns the result of applying CommutativeMonoid.combine to all the elements in t.
def forAll(f: a -> Bool \ ef, t: t[a]): Bool \ ef + Aef[t] with UnorderedFoldable[t]
 SourceReturns true if and only if all elements in t satisfy the predicate f.
Returns true if t is empty.
def isEmpty(t: t[a]): Bool \ Aef[t] with UnorderedFoldable[t]
 SourceReturns true if and only if t is empty.
def memberOf(x: a, t: t[a]): Bool \ Aef[t] with UnorderedFoldable[t], Eq[a]
 SourceReturns true if and only if the element x is in t.
def nonEmpty(t: t[a]): Bool \ Aef[t] with UnorderedFoldable[t]
 SourceReturns true if and only if t is non-empty.
def size(t: t[a]): Int32 \ Aef[t] with UnorderedFoldable[t]
 SourceReturns the number of elements in t.