Documentation
¶
Overview ¶
Package sorted provides operations over iterators whose values are sorted.
Index ¶
- func Intersect[T cmp.Ordered](s1, s2 iter.Seq[T]) iter.Seq[T]
- func IntersectFunc[T any](s1, s2 iter.Seq[T], cmp func(T, T) int) iter.Seq[T]
- func Merge[T cmp.Ordered](s1, s2 iter.Seq[T]) iter.Seq[T]
- func MergeFunc[T any](s1, s2 iter.Seq[T], cmp func(T, T) int) iter.Seq[T]
- func Subtract[T cmp.Ordered](s1, s2 iter.Seq[T]) iter.Seq[T]
- func SubtractFunc[T any](s1, s2 iter.Seq[T], cmp func(T, T) int) iter.Seq[T]
- func Union[T cmp.Ordered](s1, s2 iter.Seq[T]) iter.Seq[T]
- func UnionFunc[T any](s1, s2 iter.Seq[T], cmp func(T, T) int) iter.Seq[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Intersect ¶
Intersect returns an iterator over all elements of s1 that are also in s2, in the same order. Each element of s1 appears only once in the result. Both s1 and s2 must be sorted.
func IntersectFunc ¶
IntersectFunc returns an iterator over all elements of s1 that are also in s2, in the same order. Each element of s1 appears only once in the result. Both s1 and s2 must be sorted according to cmp.
func Merge ¶
Merge returns an iterator over all elements of s1 and s2, in the same order. Both s1 and s2 must be sorted.
func MergeFunc ¶
MergeFunc returns an iterator over all elements of s1 and s2, in the same order. Both s1 and s2 must be sorted according to cmp.
func Subtract ¶
Subtract returns an iterator over all elements of s1 that are not in s2, in the same order. Each element of s1 appears only once in the result. Both s1 and s2 must be sorted.
func SubtractFunc ¶
SubtractFunc returns an iterator over all elements of s1 that are not in s2, in the same order. Each element of s1 appears only once in the result. Both s1 and s2 must be sorted according to cmp.
Types ¶
This section is empty.