mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
iter
This commit is contained in:
@ -5,4 +5,12 @@ type sorted_set[T comparable] struct {
|
||||
set Set[T]
|
||||
}
|
||||
|
||||
func NewSortedSet[T comparable]() *sorted_set[T] {
|
||||
return &sorted_set[T]{
|
||||
set: NewHashSet[T](),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *sorted_set[T]) ToSlice() []T {
|
||||
return s.sorted
|
||||
}
|
||||
|
Reference in New Issue
Block a user