Discrete Interval Encoding Trees
// Create an empty set
let empty = @diet.empty()
// Create a set with a single element
let singleton = @diet.singleton('a')
// Create a set with an interval
let digits = @diet.interval('0', '9')
// Create from an array
let letters = @diet.of(['a', 'b', 'c', 'd', 'e'])// Union of two sets
let combined = @diet.union(set1, set2)
// Intersection of two sets
let common = @diet.intersection(set1, set2)
// Difference between sets
let difference = @diet.difference(set1, set2)
// Complement of a set
let complement = @diet.complement(set)// Add an element
let with_element = set.add(5)
// Remove an element
let without_element = set.remove(5)
// Check if an element exists
let exists = set.contains(5)pub(open) trait BoundedEnum : Compare {
pred(Self) -> Self
succ(Self) -> Self
lower_bound() -> Self
upper_bound() -> Self
}#alias(T)
type Tree[T]Discrete Interval Encoding Trees