Return the elements from
to to
in a given array
.
- Int from Starting index
- Int to Ending index
- Array array Array to take elements from
- Array The elements
from
toto
Slice n
items from array
returning the sliced
elements as a new array.
- Int n How many elements to drop
- Array array Array to drop from
- Array New Array with the dropped items
Shallow copy of a given array
.
- Array array Array that you want to copy
- Array Copied
array
array
Returns the n
th element in the given array
.
- Int n Index
- Array array Array to operate on
- Any
n
th element
Returns the first element in the given array
.
- Array array Array to operate on
- Any First element from the array
Returns the last element in a given array
.
- Array array Array to operate on
- Any Last element from
array
Returns all elements in an array
except the first.
- Array array Array to operate on
- Array All items except the first
Returns a new array containing both a
and b
.
- Array a
- Array b
- Array
Returns a new array
with the given element
appended.
- Any element Element to append
- Array array Array to operate on
- Array Array with the given
element
appended
Returns a new array
with the given element
prepended.
- Any element Element to prepend
- Array array Array to operate on
- Array Array with the given
element
prepended
Returns a new Array with the given array
s elements
reversed.
- Array array Array to operate on
- Array Array with the given
array
reversed
Returns a new array
containing only items that match a
given function.
- Function fn Filter function
- Array array Array to operate on
- Array Filtered array
Calling fn
on each element in array
returning a
modified new array.
- Function fn
- Array array
- Array
foldl executes the combinator
function once for each
element present in the array.
combinator
receives the following arguments:
- previousVal
- currentVal
- index
- array reference
- Any initial
- Function combinator
- Array array
Same as foldl expect starting from the last element in the array
Check if match
is in array
returning a Boolean.
- Any match [item to search for in
array
] - Array array
- Boolean
Checks whether the given array
has zero elements.
- Array array
- Boolean
Checks if a
is an array.
- Array a Array to operate on
- Boolean True if it is array, false otherwise