Arrays of Int8: array operations #
Removing elements, search, building arrays, iteration, equality, hashing and printing.
Removing elements #
Whether a has no elements.
Instances For
Removes the last element of a, if any, in place when a is not shared.
Instances For
The last element of a, or none if a is empty.
Instances For
The last element of a. Panics if a is empty, and then returns default.
Instances For
The elements of a from index start up to, but not including, min stop a.size, copied into a
new array.
Instances For
Linearity #
Marks a as linear, a debugging aid: if a marked array is ever copied because it is shared when
it needs to be exclusive, as before an in-place write, the runtime panics. The mark goes on an
exclusive array, so if a is shared it is copied first and the copy is marked. Logically this is
the identity.
Instances For
Returns b, marked as linear if a is marked. Like markLinear, marking copies b first if it is
shared. Logically this is b.
Instances For
Search #
Building arrays #
An array of n copies of v.
Instances For
The array with the elements of l.
Instances For
For internal use only.
Instances For
Iteration #
Folds a monadic function over the elements of a from index start up to, but not including,
stop, from first to last.
Instances For
Folds a function over the elements of a, from last to first.
Instances For
Whether some element of a is == to v.
Instances For
For internal use only.
Instances For
x ∈ a when x is an element of a.
Equality and hashing #
Decides equality by comparing the two arrays' memory.
Instances For
The same hash as a.toArray.
Instances For
Conversion and printing #
The elements of a as a list.
Instances For
Prints ScalarArray.Int8Array.mk #[...], which evaluates to an equal array.
The array with the elements of l.