提交 d227c5f2 编写于 作者: J Johannes Rieken

debt - remove unused code

上级 055e1a12
......@@ -13,19 +13,6 @@ export function tail<T>(array: T[], n: number = 0): T {
return array[array.length - (1 + n)];
}
/**
* Iterates the provided array and allows to remove
* elements while iterating.
*/
export function forEach<T>(array: T[], callback: (element: T, remove: Function) => void): void {
for (var i = 0, len = array.length; i < len; i++) {
callback(array[i], function () {
array.splice(i, 1);
i--; len--;
});
}
}
export function equals<T>(one: T[], other: T[], itemEquals: (a: T, b: T) => boolean = (a, b) => a === b): boolean {
if (one.length !== other.length) {
return false;
......@@ -283,4 +270,4 @@ export function insert<T>(array: T[], element: T): () => void {
array.splice(index, 1);
}
};
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册