Documentation
¶
Overview ¶
Package vector provides ordered immutable.Vector constructors and helpers
Index ¶
- func Conv[From, To comparable](vector immutable.Vector[From], converter func(From) (To, error)) seq.SeqE[To]
- func Convert[From, To any](vector immutable.Vector[From], converter func(From) To) seq.Seq[To]
- func Flat[From any, To any](vector immutable.Vector[From], flattener func(From) []To) seq.Seq[To]
- func Flatt[From, To comparable](vector immutable.Vector[From], flattener func(From) ([]To, error)) seq.SeqE[To]
- func New[T any](elements []T) immutable.Vector[T]
- func Of[T any](elements ...T) immutable.Vector[T]
- func Sort[T any, F cmp.Ordered](v immutable.Vector[T], by func(T) F) immutable.Vector[T]
- func Wrap[T any](elements []T) immutable.Vector[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Conv ¶
func Conv[From, To comparable](vector immutable.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 immutable.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.