排除函数

完全限定的名称:Std.Arrays.Excluding

function Excluding<'T>(remove : Int[], array : 'T[]) : 'T[]

总结

返回一个数组,该数组包含另一个数组的元素,不包括给定索引列表中的元素。

类型参数

'T

数组元素的类型。

输入

删除

一个索引数组,表示应排除哪些元素。 来自输出。

数组

在其中获取输出数组中的值的数组。

输出

数组 outputoutput[0]array 的第一个元素,其索引不会出现在 remove中,因此 output[1] 是第二个此类元素,依此类推。

let array = [10, 11, 12, 13, 14, 15];
// The following line returns [10, 12, 15].
let subarray = Excluding([1, 3, 4], array);