Documentation ¶
Index ¶
- func FoldLeft[A, B any](xs Slice[A], folder func(B, A, int) B, seed B) B
- func NewSliceFunctor[A, B any]() *sliceFunctor[A, B]
- func NewSlicePure[A any]() *slicePure[A]
- type Contain
- type Distinct
- type Grouping
- type SequenceSlice
- type Slice
- func Concat[A any](xs, ys Slice[A]) Slice[A]
- func Cons[A any](x A, xs Slice[A]) Slice[A]
- func Container[A any](capacity int) Slice[A]
- func Empty[A any]() Slice[A]
- func FlatMap[A, B any](xs Slice[A], f func(A) Slice[B]) Slice[B]
- func Flatten[A any](xxs Slice[Slice[A]]) Slice[A]
- func From[A any](xs []A) Slice[A]
- func Make[A any](xs ...A) Slice[A]
- func Map[A, B any](xs Slice[A], f func(A) B) Slice[B]
- func Room[A any](length int) Slice[A]
- func ZipBy[A, B, C any](xs Slice[A], ys Slice[B], zip func(A, B) C) Slice[C]
- func (xs Slice[A]) Append(x ...A) Slice[A]
- func (s Slice[A]) ElemType(A)
- func (xs Slice[A]) Filter(f func(A) bool) Slice[A]
- func (xs Slice[A]) For(f func(A))
- func (ys Slice[A]) ForEach(f func(int, A))
- func (ys Slice[A]) Get(index int) maybe.Maybe[A]
- func (xs Slice[A]) Head() maybe.Maybe[A]
- func (xs Slice[A]) Init() maybe.Maybe[Slice[A]]
- func (ys Slice[A]) Insert(index int, x A) maybe.Maybe[Slice[A]]
- func (s Slice[A]) Iter() collection.Iterator[A]
- func (s Slice[A]) Kind(SliceKind)
- func (xs Slice[A]) Last() maybe.Maybe[A]
- func (xs Slice[A]) Len() int
- func (ys Slice[A]) Set(index int, x A) Slice[A]
- func (xs Slice[A]) Slice(start, end int) Slice[A]
- func (xs Slice[A]) Tail() maybe.Maybe[Slice[A]]
- type SliceCollector
- type SliceFromIter
- type SliceKind
- type TraverseOption
- type TraverseResult
- type TraverseSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSliceFunctor ¶
func NewSliceFunctor[A, B any]() *sliceFunctor[A, B]
func NewSlicePure ¶
func NewSlicePure[A any]() *slicePure[A]
Types ¶
type Contain ¶
type Contain[A any] struct { interfaces.Eq[A, A] }
type Distinct ¶
type Distinct[A comparable] struct{}
type Grouping ¶
type Grouping[A, B any] struct { interfaces.Eq[B, B] interfaces.Hash[B] }
type SequenceSlice ¶
type SequenceSlice[F_, A any] struct { *TraverseSlice[F_, types.HKT[F_, A], A] }
type Slice ¶
type Slice[A any] []A
Slice
func (Slice[A]) Iter ¶
func (s Slice[A]) Iter() collection.Iterator[A]
type SliceCollector ¶
type SliceCollector[A any] struct { collection.FromIterator[SliceKind, A] }
func NewSliceCollector ¶
func NewSliceCollector[A any]() *SliceCollector[A]
func (*SliceCollector[A]) Collect ¶
func (co *SliceCollector[A]) Collect(iter collection.Iterator[A]) types.HKT[SliceKind, A]
type SliceFromIter ¶
type SliceFromIter[A any] struct{}
func (*SliceFromIter[A]) FromIter ¶
func (self *SliceFromIter[A]) FromIter(iter collection.Iterator[A]) types.HKT[SliceKind, A]
type TraverseOption ¶
type TraverseOption[A, B any] struct{}
type TraverseResult ¶
type TraverseResult[A, B any] struct{}
type TraverseSlice ¶
Click to show internal directories.
Click to hide internal directories.