leekscript
leekscript copied to clipboard
Set
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 operatorin),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