Skip to content

helder/set

Repository files navigation

set

Build Status

Set<V> using native Set on supported targets (python, js) or a Map<V, Bool> implementation when not supported.

package helder;
abstract Set<V> {
  final length: Int;
  function new(?values: Iterable<V>);
  function add(value: V): Void;
  function remove(value: V): Bool;
  function exists(value: V): Bool;
  function iterator(): Iterator<V>;
  function copy(): Set<V>;
  function toArray(): Array<V>;
  function toString(): String;
  function clear(): Void;
}

Usage

lix +lib helder.set

Install the library and add -lib helder.set to your hxml.

import helder.Set;
final set = new Set<Int>([5, 6, 5]);
set.add(7);
trace(set.toArray()); // [5, 6, 7]

Note: An earlier version of this library was published to haxelib under the name "set" and will not receive updates.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages