cerl_sets

Types


set() = set(term())

set() = set(term())

Functions


new() -> set()

is_set(Set) -> boolean()

  • Set = term()

size(Set) -> non_neg_integer()

  • Set = set()

to_list(Set) -> List

  • Set = set(Element)
  • List = [Element]

from_list(List) -> Set

  • List = [Element]
  • Set = set(Element)

is_element(Element, Set) -> boolean()

  • Set = set(Element)

add_element(Element, Set1) -> Set2

  • Set1 = set(Element)
  • Set2 = set(Element)

del_element(Element, Set1) -> Set2

  • Set1 = set(Element)
  • Set2 = set(Element)

union(Set1, Set2) -> Set3

  • Set1 = set(Element)
  • Set2 = set(Element)
  • Set3 = set(Element)

union(SetList) -> Set

  • SetList = [set(Element)]
  • Set = set(Element)

intersection(Set1, Set2) -> Set3

  • Set1 = set(Element)
  • Set2 = set(Element)
  • Set3 = set(Element)

intersection(SetList) -> Set

  • SetList = [set(Element), ...]
  • Set = set(Element)

is_disjoint(Set1, Set2) -> boolean()

  • Set1 = set(Element)
  • Set2 = set(Element)

subtract(Set1, Set2) -> Set3

  • Set1 = set(Element)
  • Set2 = set(Element)
  • Set3 = set(Element)

is_subset(Set1, Set2) -> boolean()

  • Set1 = set(Element)
  • Set2 = set(Element)

fold(Function, Acc0, Set) -> Acc1

  • Function = (Element, AccIn) -> AccOut
  • Set = set(Element)
  • Acc0 = Acc
  • Acc1 = Acc
  • AccIn = Acc
  • AccOut = Acc

filter(Pred, Set1) -> Set2

  • Pred = (Element) -> boolean()
  • Set1 = set(Element)
  • Set2 = set(Element)