Documentation
¶
Overview ¶
Package vector provides mutable.Vector constructors and helpers
Index ¶
- func Conv[From, To comparable](vector *mutable.Vector[From], converter func(From) (To, error)) seq.SeqE[To]
- func Convert[From, To any](vector *mutable.Vector[From], converter func(From) To) seq.Seq[To]
- func Empty[T any]() *mutable.Vector[T]
- func Flat[From, To any](vector *mutable.Vector[From], flattener func(From) []To) seq.Seq[To]
- func Flatt[From, To comparable](vector *mutable.Vector[From], flattener func(From) ([]To, error)) seq.SeqE[To]
- func FromSeq[T any](seq seq.Seq[T]) *mutable.Vector[T]
- func NewCap[T any](capacity int) *mutable.Vector[T]
- func Of[T any](elements ...T) *mutable.Vector[T]
- func Sort[T any, F cmp.Ordered](v *mutable.Vector[T], by func(T) F) *mutable.Vector[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Conv ¶
func Conv[From, To comparable](vector *mutable.Vector[From], converter func(From) (To, error)) seq.SeqE[To]
Conv returns an errorable seq that applies the 'converter' function to the collection elements
func Convert ¶
Convert returns a seq that applies the 'converter' function to the collection elements
func Flat ¶
Flat returns a seq that converts the collection elements into slices and then flattens them to one level
func Flatt ¶
func Flatt[From, To comparable](vector *mutable.Vector[From], flattener func(From) ([]To, error)) seq.SeqE[To]
Flatt returns an errorable seq that converts the collection elements into slices and then flattens them to one level
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.