This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Range = [number, number]; | |
export const intersectRangeArrays = (arrA: Range[], arrB: Range[]): Range[] => { | |
let result = []; | |
let aLength = arrA.length; | |
let bLength = arrB.length; | |
let ai = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.curry = function () { | |
if (arguments.length<1) { | |
return this; | |
} | |
var _this = this; | |
var _args = Array.prototype.slice.call(arguments); | |
return function() { | |
return _this.apply(this, _args.concat(Array.prototype.slice.call(arguments))); | |
} | |
} |