Documentation ¶
Index ¶
- func GroupBy[K comparable, T any](ts []T, getKey func(t T) K) map[K][]T
- type Stream
- func (stream *Stream[T]) AnyMatch(anyFunction func(t T) bool) bool
- func (stream *Stream[T]) Filter(filter func(t T) bool) *Stream[T]
- func (stream *Stream[T]) FindFirst() optional.Optional[T]
- func (stream *Stream[T]) ForEach(forEach func(t T))
- func (stream *Stream[T]) NoneMatch(anyFunction func(t T) bool) bool
- func (stream *Stream[T]) Peek(peekFunc func(t T)) *Stream[T]
- func (stream *Stream[T]) Reduce(identity T, reduce func(a, b T) T) T
- func (stream *Stream[T]) Slice() []T
- func (stream *Stream[T]) Sort(sortFunction func(a, b T) bool) *Stream[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupBy ¶
func GroupBy[K comparable, T any](ts []T, getKey func(t T) K) map[K][]T
Types ¶
Click to show internal directories.
Click to hide internal directories.