Documentation
¶
Overview ¶
Package slice implements operations on slices.
All operations act on slices of T. Use stencil to specialise to a type.
For example, in order to use a string version of this package, import it as
import ( str_slice "github.com/sridharv/stencil/std/slice/T/string" )
and run stencil on the importing package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexFunc ¶
IndexFunc returns the index of the first element for which fn returns true. If no such element exists it returns -1.
func SortStable ¶
SortStable sorts a stably using the comparison function less.
Types ¶
type T ¶
type T interface{}
func DeleteUnordered ¶
DeleteUnordered removes the ith element in a, without preserving order. It can be faster that Delete as it results in much fewer copies.
func InsertSlice ¶
InsertSlice inserts v into a at index i and returns the new slice
Click to show internal directories.
Click to hide internal directories.