Tests whether all elements in the array pass the given predicate.
predicate to check elements.
true
if for every element the predicate returns true
.
Filters elements of this container. Returns empty container if the predicates filters all elements in this container.
filter predicate.
new container with elements for which p(element) === true.
Returns the value of the first element in the array that satisfies the provided predicate. Otherwise undefined is returned.
predicate to check elements.
first found element or undefined.
Executes given function for each element in this container.
function to apply to each element.
Returns new CollectionIterator to iterate over this
collection.
new instance of iterator for this
collection.
Transforms every element of this container and returns new container with transformed elements. Returns empty container if this container is empty.
transformation function.
new container with transformed elements.
Reduces content of this container to some another type's instance.
reducer.
initial value of accumulator.
result of reducing.
Returns amount of elements in this container.
amount of elements in this container.
Checks whether there is an element that passes given predicate.
predicate to check elements.
true
if there is an element for which the predicate returns true
.
Generated using TypeDoc
Defines abstract contract for collection with elements that allows iterations and transformations. Be aware that there is no any method for mutating container's content, so it is preferable that all high order functions that are passed into methods of the container are implemented as pure functions.