4export { newSTArray as new };
6export const peekImpl = function (just, nothing, i, xs) {
7 return i >= 0 && i < xs.length ? just(xs[i]) : nothing;
10export const pokeImpl = function (i, a, xs) {
11 var ret = i >= 0 && i < xs.length;
16export const lengthImpl = function (xs) {
20export const popImpl = function (just, nothing, xs) {
21 return xs.length > 0 ? just(xs.pop()) : nothing;
24export const pushAllImpl = function (as, xs) {
25 return xs.push.apply(xs, as);
28export const shiftImpl = function (just, nothing, xs) {
29 return xs.length > 0 ? just(xs.shift()) : nothing;
32export const unshiftAllImpl = function (as, xs) {
33 return xs.unshift.apply(xs, as);
36export const spliceImpl = function (i, howMany, bs, xs) {
37 return xs.splice.apply(xs, [i, howMany].concat(bs));
40function unsafeFreezeThawImpl(xs) {
44export const unsafeFreezeImpl = unsafeFreezeThawImpl;
46export const unsafeThawImpl = unsafeFreezeThawImpl;
48function copyImpl(xs) {
52export const freezeImpl = copyImpl;
54export const thawImpl = copyImpl;
56export const cloneImpl = copyImpl;
58export const sortByImpl = (function () {
59 function mergeFromTo(compare, fromOrdering, xs1, xs2, from, to) {
68 mid = from + ((to - from) >> 1);
69 if (mid - from > 1) mergeFromTo(compare, fromOrdering, xs2, xs1, from, mid);
70 if (to - mid > 1) mergeFromTo(compare, fromOrdering, xs2, xs1, mid, to);
75 while (i < mid && j < to) {
78 c = fromOrdering(compare(x)(y));
95 return function (compare, fromOrdering, xs) {
96 if (xs.length < 2) return xs;
98 mergeFromTo(compare, fromOrdering, xs, xs.slice(0), 0, xs.length);
104export const toAssocArrayImpl = function (xs) {
106 var as = new Array(n);
107 for (var i = 0; i < n; i++) as[i] = { value: xs[i], index: i };
111export const pushImpl = function (a, xs) {
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list