Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeenMap ¶
type SeenMap[T comparable] struct { // contains filtered or unexported fields }
SeenMap is a map that keeps track of which keys have been seen.
func NewSeenMap ¶
func NewSeenMap[T comparable]() *SeenMap[T]
NewSeenMap creates a new SeenMap.
Returns:
- *SeenMap[T]: A pointer to the new SeenMap. Never returns nil.
func (*SeenMap[T]) FilterSeen ¶
func (s *SeenMap[T]) FilterSeen(elems []T) []T
FilterSeen returns the elements that have not been seen.
Parameters:
- elems: The elements to filter.
Returns:
- []T: The elements that have not been seen.
Click to show internal directories.
Click to hide internal directories.