vector

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[S, T any](v []S, f func(S) T) []T

Types

type Vector

type Vector[T any] []T

func New

func New[T any](vs []T) Vector[T]

func (Vector[T]) Append

func (v Vector[T]) Append(vs ...T) Vector[T]

func (Vector[T]) Filter

func (v Vector[T]) Filter(eq func(T) bool) Vector[T]

func (Vector[T]) IsEmpty

func (v Vector[T]) IsEmpty() bool

func (Vector[T]) Raw

func (v Vector[T]) Raw() []T

func (Vector[T]) Reverse

func (v Vector[T]) Reverse() Vector[T]

func (Vector[T]) Sort

func (v Vector[T]) Sort(less func(x, y T) bool) Vector[T]

func (Vector[T]) Upsert

func (v Vector[T]) Upsert(val T, eq func(x, y T) bool) Vector[T]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL