Documentation ¶
Index ¶
- func Concat(slices ...[]interface{}) []interface{}
- func CopyAppend(slice []interface{}, elements ...interface{}) []interface{}
- func CopyPrepend(slice []interface{}, elements ...interface{}) []interface{}
- func DeepFlatten(slice []interface{}, depth int) []interface{}
- func Delete(slice []interface{}, i int, n int) []interface{}
- func DeleteAt(slice []interface{}, i int) []interface{}
- func EmptySlice() []interface{}
- func Flatten(slice []interface{}) []interface{}
- func Slice(elements ...interface{}) []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Concat ¶
func Concat(slices ...[]interface{}) []interface{}
Concatenate slices into a single slice
func CopyAppend ¶
func CopyAppend(slice []interface{}, elements ...interface{}) []interface{}
Like append but on the interface{} type and always to a fresh backing array so can be used safely with slices over arrays you did not create.
func CopyPrepend ¶
func CopyPrepend(slice []interface{}, elements ...interface{}) []interface{}
Prepend elements to slice in the order they appear
func DeepFlatten ¶
func DeepFlatten(slice []interface{}, depth int) []interface{}
Recursively flattens a list by splicing any sub-lists into their parent until depth is reached. If a negative number is passed for depth then it continues until no elements of the returned list are lists
func Delete ¶
Deletes n elements starting with the ith from a slice by splicing. Beware uses append so the underlying backing array will be modified!
func DeleteAt ¶
func DeleteAt(slice []interface{}, i int) []interface{}
Delete an element at a specific index and return the contracted list
func EmptySlice ¶
func EmptySlice() []interface{}
Types ¶
This section is empty.