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] clone.splice(index, 1) return clone }