Skip to content

Set #24

Description

@Hazurl

A set is a data structure that holds an unordered list of unique values. It's optimized to know whether a value is present in the set.

  • Syntax <1, 2, 5> [set] Implements syntax & typing #25
  • Typing: a set is templated. By default, it's Set<Any> [set] Implements syntax & typing #25
  • Basic set operations setIntersection, setUnion, setDifference; aliased respectively to the operators &, | (and +), and -.
  • Basic non-mutation operations setContains (aliased to the operator in), setSize, setIsEmpty, setIsSubsetOf [set] Add basic set methods #27
  • Basic mutation operations setPut, setRemove, setClear [set] Add basic set methods #27
  • Conversion to/from other structures intervalToSet, arrayToSet, setToMap, mapKeysToSet, setToArray
  • Iterate set with for-loop
  • Other helper functions setAverage, setEvery, setSome, setFold, setIter, setMax, setMin, setSum, setFilter
  • toString

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions