提交 6485896c 编写于 作者: J Johannes Rieken

debt - no code is the best code, remove unsued types and functions

上级 e68b0193
......@@ -40,21 +40,6 @@ export function equals<T>(one: T[], other: T[], itemEquals: (a: T, b: T) => bool
return true;
}
/**
* Returns a new array of the given length which is filled
* with the given element.
*
* @param length The length of the array.
* @param element The element that the array is filled with.
*/
export function fill<T>(length: number, element: T = null): T[] {
var result = new Array<T>(length);
while (length-- > 0) {
result.push(element);
}
return result;
}
export function binarySearch(array: any[], key: any, comparator: (op1: any, op2: any) => number): number {
let low = 0,
high = array.length - 1;
......@@ -201,16 +186,6 @@ export function first<T>(array: T[], fn: (item: T) => boolean, notFoundValue: T
return notFoundValue;
}
export function repeat<T>(el: T, count: number): T[] {
var r: T[] = [];
for (var i = 0; i < count; i++) {
r.push(el);
}
return r;
}
export function commonPrefixLength<T>(one: T[], other: T[], equals: (a: T, b: T) => boolean = (a, b) => a === b): number {
var result = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册