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 DoublyLinked
 - type Linked
 - 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 DoublyLinked ¶
type DoublyLinked[T any] struct { // contains filtered or unexported fields }
func NewDoublyLinked ¶
func NewDoublyLinked[T any]() DoublyLinked[T]
func (*DoublyLinked[T]) Append ¶
func (d *DoublyLinked[T]) Append(v T)
func (*DoublyLinked[T]) Empty ¶
func (d *DoublyLinked[T]) Empty() bool
func (*DoublyLinked[T]) TakeFirst ¶
func (d *DoublyLinked[T]) TakeFirst() T
func (*DoublyLinked[T]) TakeLast ¶
func (d *DoublyLinked[T]) TakeLast() T
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.