import type { NonEmptyArray } from "../NonEmptyArray";
/*
* -------------------------------------------
* Guards
* -------------------------------------------
*/
export const isOutOfBound_ = (i: number, as: ReadonlyArray): boolean => i < 0 || i >= as.length;
export const isOutOfBound = (i: number) => (as: ReadonlyArray): boolean => isOutOfBound_(i, as);
export const isEmpty = (as: ReadonlyArray): boolean => as.length === 0;
export const isNonEmpty = (as: ReadonlyArray): as is NonEmptyArray => as.length > 0;