export function arrayExtension(array: Array, index: number, newValue: T): Array { const clone = [...array] clone[index] = newValue return clone } export function arrayExclude(array: Array, index: number): Array { const clone = [...array] delete clone[index] return clone }