Documentation ¶
Index ¶
- func Contains[T comparable](s []T, i T) bool
- func Fill[T any](x int, def T) []T
- func Fill2D[T any](x, y int, def T) [][]T
- func Filter[S ~[]E, E any](s S, predicate func(E) bool) S
- func Intersection[T comparable](a, b []T) []T
- func Map[T, U any](s []T, f func(T) U) []U
- func MapMap[T, U any, V, W comparable](s map[V]T, f func(V, T) (W, U)) map[W]U
- func Range[N math.Number](a, b N) []N
- func Reduce[T any, U any](s []T, f func(U, T) U) U
- func Reverse[T any](s []T) []T
- type Pair
- type Pairs
- type Queue
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](s []T, i T) bool
func Intersection ¶
func Intersection[T comparable](a, b []T) []T
func MapMap ¶
func MapMap[T, U any, V, W comparable](s map[V]T, f func(V, T) (W, U)) map[W]U
Types ¶
type Pairs ¶
func MapToSlice ¶
func MapToSlice[T comparable, U any](s map[T]U) Pairs[T, U]
Click to show internal directories.
Click to hide internal directories.