Created
March 30, 2010 22:56
-
-
Save StanAngeloff/349718 to your computer and use it in GitHub Desktop.
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
[left[0...1], right[0..1]]: [right[0..1], left[0...1]] |
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(){ | |
var _a, _b, _c; | |
var __range = function(array, from, to, exclusive) { | |
return [ | |
(from < 0 ? from + array.length : from || 0), | |
(to < 0 ? to + array.length : to || array.length) + (exclusive ? 0 : 1) | |
]; | |
}; | |
_a = [right.slice.apply(right, __range(right, 0, 1, false)), left.slice.apply(left, __range(left, 0, 1, true))]; | |
left.splice.apply(left, [(_b = __range(left, 0, 1, true))[0], _b[1] - _b[0]].concat(_a[0])) | |
right.splice.apply(right, [(_c = __range(right, 0, 1, false))[0], _c[1] - _c[0]].concat(_a[1])) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment