slice¶
type slice < sequenceA slice of elements.
meth slice(): sliceReturns an empty slice.
slice() :> []
meth slice(Sequence: sequence, ...): sliceReturns a list of all of the values produced by
Sequence.slice(1 .. 10) :> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
meth slice(Tuple: tuple): sliceReturns a slice containing the values in
Tuple.slice((1, 2, 3)) :> [1, 2, 3]
meth (Arg₁: slice) != (Arg₂: slice)TBD
meth (Arg₁: slice) + (Arg₂: slice)TBD
meth (Arg₁: slice) < (Arg₂: slice)TBD
meth (Arg₁: slice) <= (Arg₂: slice)TBD
meth (Arg₁: slice) = (Arg₂: slice)TBD
meth (Arg₁: slice) > (Arg₂: slice)TBD
meth (Arg₁: slice) >= (Arg₂: slice)TBD
meth (Slice: slice)[Index: integer]: slice::index | nilReturns the
Index-th node inSliceornilifIndexis outside the interval ofList. Indexing starts at1. Negative indices are counted from the end of the list, with-1returning the last node.let L := slice(["a", "b", "c", "d", "e", "f"]) L[3] :> "c" L[-2] :> "e" L[8] :> nil
meth (Slice: slice)[Indices: vector]: sliceReturns a list containing the
List[Indices[1]],List[Indices[2]], etc.meth (Arg₁: slice):afind(Arg₂: any, Arg₃: function)TBD
meth (Arg₁: slice):afind(Arg₂: any, Arg₃: function, Arg₄: function)TBD
meth (Arg₁: slice):afinderTBD
meth (Slice: slice):backwards: SequenceReturns a sequence which will iterate over
Slicebackwards.map(slice("abc"):backwards) :> {3 is "c", 2 is "b", 1 is "a"}
meth (Arg₁: slice):bfind(Arg₂: any)TBD
meth (Arg₁: slice):bfind(Arg₂: any, Arg₃: function)TBD
meth (Slice: slice):capacity: integerReturns the capacity of
Sliceslice([1, 2, 3]):capacity :> 3
meth (Slice: slice):count: integerReturns the length of
Sliceslice([1, 2, 3]):count :> 3
meth (Arg₁: slice):find(Arg₂: any)TBD
meth (Arg₁: slice):find(Arg₂: any, Arg₃: function)TBD
meth (Slice: slice):firstReturns the first value in
SliceornilifSliceis empty.meth (Slice: slice):first2Returns the first index and value in
SliceornilifSliceis empty.meth (Slice: slice):lastReturns the last value in
SliceornilifSliceis empty.meth (Slice: slice):last2Returns the last index and value in
SliceornilifSliceis empty.meth (Slice: slice):length: integerReturns the length of
Sliceslice([1, 2, 3]):length :> 3
meth (Slice: slice):offset: integerReturns the offset of
Sliceslice([1, 2, 3]):offset :> 0
meth (Slice: slice):precount: integerReturns the length of
Sliceslice([1, 2, 3]):precount :> 3
meth (Arg₁: slice):randomTBD
meth (Slice: slice):sort(Compare: any): SliceSorts
Slicein-place using<and returns it.meth (Slice: slice):sort(Compare: function): SliceSorts
Slicein-place usingCompareand returns it.meth (Slice: slice):sort(Compare: method): SliceSorts
Slicein-place usingCompareand returns it.meth (Arg₁: slice):subsetsTBD
meth (Arg₁: slice):subsets(Arg₂: integer)TBD
meth (Arg₁: string::buffer):append(Arg₂: slice)TBD
meth (Arg₁: string::buffer):append(Arg₂: slice, Arg₃: string)TBD
type slice::indexAn assignable reference to an index of a slice.
type slice::mutable < sliceTBD
meth (Slice: slice::mutable)[Interval: integer::interval]: slice::sliceReturns a slice of
Slicestarting atInterval:startand ending atInterval:limit, both inclusive. Indexing starts at1. Negative indices are counted from the end of the slice, with-1returning the last node.meth (Slice: slice::mutable)[Interval: integer::range]: slice::sliceReturns a slice of
Slicestarting atInterval:startand ending atInterval:limit, both inclusive. Indexing starts at1. Negative indices are counted from the end of the slice, with-1returning the last node.meth (Slice: slice::mutable)[Indices: integer, Arg₃: integer]: sliceReturns a slice containing the
List[Indices[1]],List[Indices[2]], etc.meth (Arg₁: slice::mutable):cycleTBD
meth (Arg₁: slice::mutable):delete(Arg₂: integer)TBD
meth (Arg₁: slice::mutable):emptyTBD
meth (Slice: slice::mutable):filter(Filter: function): sliceRemoves every
ValuefromSlicefor whichFunction(Value)returnsniland returns those values in a new list.let L := slice([1, 2, 3, 4, 5, 6]) L:filter(2 | _) :> [1, 3, 5] L :> [2, 4, 6]
meth (Slice: slice::mutable):grow(Sequence: sequence, ...): slicePushes of all of the values produced by
SequenceontoListand returnsList.let L := slice([1, 2, 3]) L:grow(4 .. 6) :> [1, 2, 3, 4, 5, 6]
meth (Arg₁: slice::mutable):insert(Arg₂: integer, Arg₃: any)TBD
meth (Slice: slice::mutable):order: permutationReturns the ordering of the elements of
Sliceas a permutation, index of first element, index of second element, ..., index of last element, when compared by<=.let S := slice(["D", "B", "A", "C"]) :> [D, B, A, C] S:order :> <3 2 4 1>
meth (Slice: slice::mutable):order(Compare: function): permutationReturns the ordering of the elements of
Sliceas a permutation, index of first element, index of second element, ..., index of last element, when compared byCompare.let S := slice(["D", "B", "A", "C"]) :> [D, B, A, C] S:order(>) :> <1 4 2 3>
meth (Arg₁: slice::mutable):permutationsTBD
meth (Arg₁: slice::mutable):permuteTBD
meth (Arg₁: slice::mutable):permute(Arg₂: permutation)TBD
meth (Arg₁: slice::mutable):popTBD
meth (Arg₁: slice::mutable):pop(Arg₂: function)TBD
meth (Arg₁: slice::mutable):pullTBD
meth (Arg₁: slice::mutable):pull(Arg₂: function)TBD
meth (Arg₁: slice::mutable):push(...)TBD
meth (Arg₁: slice::mutable):put(...)TBD
meth (Slice: slice::mutable):remove(Filter: function): sliceRemoves every
ValuefromSlicefor whichFunction(Value)returns non-niland returns those values in a new list.let L := slice([1, 2, 3, 4, 5, 6]) L:remove(2 | _) :> [2, 4, 6] L :> [1, 3, 5]
meth (Arg₁: slice::mutable):reverseTBD
meth (Arg₁: slice::mutable):shuffleTBD
meth (Slice: slice::mutable):sort(By: function, Order: function): SliceSorts
Slicein-place usingOrder(By(Vᵢ), By(Vⱼ))as the comparison function (evaluatingBy(Vᵢ)only once for eachi).let S := slice(["The", "capital", "of", "Ireland", "is", "Dublin"]) :> [The, capital, of, Ireland, is, Dublin] S:sort(:upper, <) :> [capital, Dublin, Ireland, is, of, The]
meth (Arg₁: slice::mutable):spliceTBD
meth (Arg₁: slice::mutable):splice(Arg₂: integer)TBD
meth (Arg₁: slice::mutable):splice(Arg₂: integer, Arg₃: integer)TBD
meth (Arg₁: slice::mutable):splice(Arg₂: integer, Arg₃: integer, Arg₄: slice::mutable)TBD
meth (Arg₁: slice::mutable):splice(Arg₂: integer, Arg₃: slice::mutable)TBD
type slice::sliceA sub-slice.
meth (Arg₁: visitor):const(Arg₂: slice::mutable)TBD
meth (Arg₁: visitor):copy(Arg₂: slice)TBD
meth (Arg₁: visitor):visit(Arg₂: slice)TBD