Documentation ¶
Index ¶
- func DelItem[E comparable](list []E, delE E) []E
- func Difference[E comparable](slice1, slice2 []E) []E
- func Intersect[E comparable](slice1, slice2 []E) []E
- func IsExistItem[E comparable](list []E, ele E) bool
- func RemoveDuplicItem[E comparable](list []E) []E
- func Union[E comparable](slice1, slice2 []E) []E
- type List
- func (l *List[E]) Append(item E)
- func (l *List[E]) AppendByArray(items []E)
- func (l *List[E]) At(index int) (v E, err error)
- func (l *List[E]) Clear()
- func (l *List[E]) First() (v E, err error)
- func (l *List[E]) Insert(index int, item E) error
- func (l *List[E]) Last() (v E, err error)
- func (l *List[E]) Len() int
- func (l *List[E]) Move(from, to int) error
- func (l *List[E]) PreAppend(item E)
- func (l *List[E]) Range(f func(index int, v E))
- func (l *List[E]) RemoveAt(index int) error
- func (l *List[E]) RemoveFirst() error
- func (l *List[E]) RemoveLast() error
- func (l *List[E]) ResetByArray(items []E)
- func (l *List[E]) String() string
- func (l *List[E]) SwapItemsAt(idx1, idx2 int) error
- func (l *List[E]) TakeAll() []E
- func (l *List[E]) TakeAt(idx int) (v E, err error)
- func (l *List[E]) TakeFirst() (v E, err error)
- func (l *List[E]) TakeHeadN(count int) []E
- func (l *List[E]) TakeLast() (v E, err error)
- func (l *List[E]) ToArray() []E
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type List ¶
type List[E any] struct { // contains filtered or unexported fields }
func (*List[E]) AppendByArray ¶
func (l *List[E]) AppendByArray(items []E)
func (*List[E]) RemoveFirst ¶
func (*List[E]) RemoveLast ¶
func (*List[E]) ResetByArray ¶
func (l *List[E]) ResetByArray(items []E)
func (*List[E]) SwapItemsAt ¶
Click to show internal directories.
Click to hide internal directories.