Documentation
¶
Overview ¶
Package arrays contains functions for manipulating arrays.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Scope = wdte.S().Map(map[wdte.ID]wdte.Func{ "append": wdte.GoFunc(Append), "sort": wdte.GoFunc(Sort), "sortStable": wdte.GoFunc(SortStable), "stream": wdte.GoFunc(Stream), })
Scope is a scope containing the functions in this package.
Functions ¶
func Append ¶ added in v0.2.2
Append is a WDTE function with the following signatures:
append array val... (append array) val...
Returns a copy of the given array with values appended to it.
func Sort ¶ added in v0.2.2
Sort is a WDTE function with the following signatures:
sort array less (sort array) less sort less array (sort less) array
Returns a sorted copy of the given array sorted using the given less function. The less function should take two arguments and return true if the first argument should be sorted earlier in the array then the second. Unlike sortStable, the relative positions of equal elements are undefined in the new array.
func SortStable ¶ added in v0.2.2
SortStable is a WDTE function with the following signatures:
sortStable array less (sortStable array) less sortStable less array (sortStable less) array
Returns a sorted copy of the given array sorted using the given less function. The less function should take two arguments and return true if the first argument should be sorted earlier in the array then the second. Unlike sort, the relative positions of equal elements are preserved.
Types ¶
This section is empty.