Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set #24

Open
7 of 9 tasks
Hazurl opened this issue Aug 4, 2023 · 0 comments
Open
7 of 9 tasks

Set #24

Hazurl opened this issue Aug 4, 2023 · 0 comments

Comments

@Hazurl
Copy link
Contributor

Hazurl commented Aug 4, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant