Documentation ¶
Index ¶
- type List
- func (l List) DeleteAllInstances(n int) List
- func (l List) DeleteFirstInstance(n int) List
- func (l List) DeleteIndex(i int) List
- func (l List) Each(executor func(i interface{}))
- func (l List) Filter(filter func(i interface{}) bool) List
- func (l List) Find(i interface{}) ([]int, bool)
- func (l List) Map(mapper func(i interface{}) interface{}) List
- func (l List) Reduce(reducer func(acc interface{}, i interface{}) interface{}, acc interface{}) interface{}
- func (l List) Reverse() List
- func (l List) Sort(sorter func(param1 int, param2 int) bool) List
- func (l List) Unique() List
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List []interface{}
List - Generic List
func (List) DeleteAllInstances ¶
DeleteAllInstances - Deletes all elements with the passed value
func (List) DeleteFirstInstance ¶
DeleteFirstInstance - Deletes first instance of element with the passed value
func (List) DeleteIndex ¶
DeleteIndex - Deletes element at particular index
func (List) Each ¶
func (l List) Each(executor func(i interface{}))
Each - Performs action on each element
func (List) Find ¶
Find - Finds the passed element and return indices of occurrence and returns true if present
func (List) Reduce ¶
func (l List) Reduce(reducer func(acc interface{}, i interface{}) interface{}, acc interface{}) interface{}
Reduce - Accumulates result from given function and returns the result
Click to show internal directories.
Click to hide internal directories.