← effect
Array135
Getters
dropconstRemoves the first n elements, creating a new array.dropRightconstRemoves the last n elements, creating a new array.dropWhileconstDrops elements from the start while the predicate holds, returning the rest.dropWhileFilterconstDrops elements from the start while a Filter succeeds.getconstReads an element at the given index safely, returning Option.some or Option.none if the index is out of bounds.headconstReturns the first element of an array safely wrapped in Option.some, or Option.none if the array is empty.headNonEmptyconstReturns the first element of a NonEmptyReadonlyArray directly (no Option wrapper).initfunctionReturns all elements except the last safely, wrapped in an Option.initNonEmptyconstReturns all elements except the last of a NonEmptyReadonlyArray.lastconstReturns the last element of an array safely wrapped in Option.some, or Option.none if the array is empty.lastNonEmptyconstReturns the last element of a NonEmptyReadonlyArray directly (no Option wrapper).lengthconstReturns the number of elements in a ReadonlyArray.tailfunctionReturns all elements except the first safely, wrapped in an Option.tailNonEmptyconstReturns all elements except the first of a NonEmptyReadonlyArray.takeconstKeeps the first n elements, creating a new array.takeRightconstKeeps the last n elements, creating a new array.takeWhileconstTakes elements from the start while the predicate holds, stopping at the first element that fails.takeWhileFilterconstTakes elements from the start while a Filter succeeds, collecting transformed values.Elements
cartesianconstComputes the cartesian product of two arrays, returning all pairs as tuples.cartesianWithconstComputes the cartesian product of two arrays, applying a combiner to each pair.chopconstApplies a function repeatedly to consume prefixes of the array and collect the values it produces.containsconstChecks whether an array contains a value, using Equal.equivalence() for comparison.containsWithconstReturns a membership-test function using a custom equivalence.copyconstCreates a shallow copy of an array.dedupeconstRemoves duplicates using Equal.equivalence(), preserving the order of the first occurrence.dedupeAdjacentconstRemoves consecutive duplicate elements using Equal.equivalence().dedupeAdjacentWithconstRemoves consecutive duplicate elements using a custom equivalence.dedupeWithconstRemoves duplicates using a custom equivalence, preserving the order of the first occurrence.differenceconstComputes elements in the first array that are not in the second, using Equal.equivalence().differenceWithconstComputes elements in the first array that are not in the second, using a custom equivalence.everyconstChecks whether all elements satisfy the predicate.findFirstconstReturns the first element matching a predicate, refinement, or mapping function, wrapped in Option.findFirstIndexconstReturns the index of the first element matching the predicate, wrapped in an Option.findFirstWithIndexconstReturns the first selected value together with its index, wrapped in an Option.findLastconstReturns the last element matching a predicate, refinement, or mapping function, wrapped in Option.findLastIndexconstReturns the index of the last element matching the predicate, wrapped in an Option.forEachconstRuns a side-effect for each element.insertAtconstInserts an element at the specified index safely, returning a new NonEmptyArray wrapped in an Option.intersectionconstComputes the intersection of two arrays using Equal.equivalence().intersectionWithconstComputes the intersection of two arrays using a custom equivalence.intersperseconstPlaces a separator element between every pair of elements.maxconstReturns the maximum element of a non-empty array according to the given Order.minconstReturns the minimum element of a non-empty array according to the given Order.modifyconstApplies a function to the element at the specified index safely, returning the updated array in Option.some.modifyHeadNonEmptyconstApplies a function to the first element of a non-empty array, returning a new array.modifyLastNonEmptyconstApplies a function to the last element of a non-empty array, returning a new array.padconstPads or truncates an array to exactly n elements, filling with fill if the array is shorter, or slicing if longer.removeconstRemoves the element at the specified index, returning a new array.replaceconstReplaces the element at the specified index safely with a new value, returning the updated array in Option.some.reverseconstReverses an iterable into a new array.rotateconstTransforms an array by rotating it n steps.setHeadNonEmptyconstReplaces the first element of a non-empty array with a new value.setLastNonEmptyconstReplaces the last element of a non-empty array with a new value.someconstChecks whether at least one element satisfies the predicate.sortWithconstSorts an array by a derived key using a mapping function and an Order for that key.unionconstComputes the union of two arrays, removing duplicates using Equal.equivalence().unionWithconstComputes the union of two arrays using a custom equivalence, removing duplicates.