Module mapsets

set implementation using maps.

Copyright © X4lldux <>


set implementation using maps.

Copyright X4lldux 2017 <>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Data Types


abstract datatype: set(Element)


set() = set(term())

Function Index

add_element/2adds an element to a set.
from_list/1given a list, returns a set.
intersection/2given two sets, returns their intersection.
new/0returns new set.
size/1given set, returns it's size.
to_list/1given a set, returns a list of elements.

Function Details


add_element(E, Mapset::set(E)) -> set(E)

adds an element to a set


from_list(L::[E]) -> set(E)

given a list, returns a set


intersection(Mapset::set(E), X2::set(E)) -> set(E)

given two sets, returns their intersection


new() -> set()

returns new set


size(Mapset::set()) -> integer()

given set, returns it's size


to_list(Mapset::set(E)) -> [E]

given a set, returns a list of elements

Generated by EDoc