leekscript icon indicating copy to clipboard operation
leekscript copied to clipboard

Set

Open Hazurl opened this issue 2 years ago • 0 comments

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.

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

Hazurl avatar Aug 04 '23 18:08 Hazurl