slice¶
type slice < sequence
A slice of elements.
meth slice(): slice
Returns an empty slice.
slice() :> []
meth slice(Sequence: sequence, ...): slice
Returns 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): slice
Returns 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 | nil
Returns the
Index
-th node inSlice
ornil
ifIndex
is outside the interval ofList
. Indexing starts at1
. Negative indices are counted from the end of the list, with-1
returning the last node.let L := slice(["a", "b", "c", "d", "e", "f"]) L[3] :> "c" L[-2] :> "e" L[8] :> nil
meth (Arg₁: slice):afind(Arg₂: any, Arg₃: function)
TBD
meth (Arg₁: slice):afind(Arg₂: any, Arg₃: function, Arg₄: function)
TBD
meth (Arg₁: slice):afinder
TBD
meth (Arg₁: slice):bfind(Arg₂: any)
TBD
meth (Arg₁: slice):bfind(Arg₂: any, Arg₃: function)
TBD
meth (Slice: slice):capacity: integer
Returns the capacity of
Slice
slice([1, 2, 3]):capacity :> 3
meth (Slice: slice):count: integer
Returns the length of
Slice
slice([1, 2, 3]):count :> 3
meth (Arg₁: slice):find(Arg₂: any)
TBD
meth (Arg₁: slice):find(Arg₂: any, Arg₃: function)
TBD
meth (Slice: slice):first
Returns the first value in
Slice
ornil
ifSlice
is empty.meth (Slice: slice):first2
Returns the first index and value in
Slice
ornil
ifSlice
is empty.meth (Slice: slice):last
Returns the last value in
Slice
ornil
ifSlice
is empty.meth (Slice: slice):last2
Returns the last index and value in
Slice
ornil
ifSlice
is empty.meth (Slice: slice):length: integer
Returns the length of
Slice
slice([1, 2, 3]):length :> 3
meth (Slice: slice):offset: integer
Returns the offset of
Slice
slice([1, 2, 3]):offset :> 0
meth (Slice: slice):precount: integer
Returns the length of
Slice
slice([1, 2, 3]):precount :> 3
meth (Arg₁: slice):random
TBD
meth (Arg₁: slice):sort
TBD
meth (Arg₁: slice):sort(Arg₂: function)
TBD
meth (Arg₁: string::buffer):append(Arg₂: slice)
TBD
meth (Arg₁: string::buffer):append(Arg₂: slice, Arg₃: string)
TBD
type slice::index
An assignable reference to an index of a slice.
type slice::iter
TBD
type slice::mutable < slice
TBD
meth (Slice: slice::mutable)[Interval: integer::interval]: slice::slice
Returns a slice of
Slice
starting atInterval:start
and ending atInterval:limit
, both inclusive. Indexing starts at1
. Negative indices are counted from the end of the slice, with-1
returning the last node.meth (Slice: slice::mutable)[Interval: integer::range]: slice::slice
Returns a slice of
Slice
starting atInterval:start
and ending atInterval:limit
, both inclusive. Indexing starts at1
. Negative indices are counted from the end of the slice, with-1
returning the last node.meth (Slice: slice::mutable)[Indices: integer, Arg₃: integer]: slice
Returns a slice containing the
List[Indices[1]]
,List[Indices[2]]
, etc.meth (Arg₁: slice::mutable):cycle
TBD
meth (Arg₁: slice::mutable):delete(Arg₂: integer)
TBD
meth (Arg₁: slice::mutable):empty
TBD
meth (Slice: slice::mutable):filter(Filter: function): slice
Removes every
Value
fromSlice
for whichFunction(Value)
returnsnil
and 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, ...): slice
Pushes of all of the values produced by
Sequence
ontoList
and 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 (Arg₁: slice::mutable):permutations
TBD
meth (Arg₁: slice::mutable):permute
TBD
meth (Arg₁: slice::mutable):pop
TBD
meth (Arg₁: slice::mutable):pop(Arg₂: function)
TBD
meth (Arg₁: slice::mutable):pull
TBD
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): slice
Removes every
Value
fromSlice
for whichFunction(Value)
returns non-nil
and 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):reverse
TBD
meth (Arg₁: slice::mutable):shuffle
TBD
meth (Arg₁: slice::mutable):splice
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::mutable::iter < slice::iter
TBD
type slice::slice
A sub-slice.
meth (Arg₁: visitor):const(Arg₂: slice::mutable)
TBD
meth (Arg₁: visitor):copy(Arg₂: slice)
TBD
meth (Arg₁: visitor):visit(Arg₂: slice)
TBD