3var String = function() {
5 function append(s1) { return function(s2) {
9 function map(f) { return function(s) {
10 for (var i = s.length; i--; ) { s[i] = f(s[i]); }
14 function intercalate(sep) { return function(ss) {
15 return Value.listToArray(ss).join(sep);
18 function intersperse(sep) { return function(s) {
19 return s.split("").join(sep);
23 function foldl(f) { return function(b) { return function(s) {
25 for (var i = 0, len = s.length; i < len; ++i) { acc = f(s[i])(acc); }
30 function foldr(f) { return function(b) { return function(s) {
32 for (var i = s.length; i--; ) { acc = f(s[i])(acc); }
38 function concatMap(f) { return function(s) {
40 for (var i = a.length; i--; ) { a[i] = f(a[i]); }
45 function forall(pred) { return function(s) {
46 for (var i = s.length; i--; ) { if (!pred(s[i])) {return false}; }
50 function exists(pred) { return function(s) {
51 for (var i = s.length; i--; ) { if (pred(s[i])) {return true}; }
56 return {cons : append,
58 head : function(s) { return s[0]; },
59 last : function(s) { return s[s.length-1]; },
60 tail : function(s) { return s.slice(1); },
61 length : function(s) { return s.length; },
63 intercalate : intercalate,
64 intersperse : intersperse,
65 reverse : function(s) { return s.split("").reverse().join(""); },
66 toLower : function(s) { return s.toLowerCase(); },
67 toUpper : function(s) { return s.toUpperCase(); },
70 concat : function(ss) { return Value.listToArray(ss).join(""); },
71 concatMap : concatMap,
77 toText : Value.toText,
78 properEscape : Value.properEscape
83var String = {toText:Value.toText, properEscape:Value.properEscape};
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