/**
* @since 2.0.0
*/
import type { NonEmptyArray } from "../Array.ts"
/** @internal */
export const isArrayNonEmpty = (self: ReadonlyArray): self is NonEmptyArray => self.length > 0
/** @internal */
export function replaceAt(self: ReadonlyArray, index: number, value: A): Array {
const out = self.slice()
out[index] = value
return out
}