UNPKG

4.93 kBJavaScriptView Raw
1// Generated by LiveScript 1.6.0
2var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString;
3Func = require('./Func.js');
4List = require('./List.js');
5Obj = require('./Obj.js');
6Str = require('./Str.js');
7Num = require('./Num.js');
8id = function(x){
9 return x;
10};
11isType = curry$(function(type, x){
12 return toString$.call(x).slice(8, -1) === type;
13});
14replicate = curry$(function(n, x){
15 var i$, results$ = [];
16 for (i$ = 0; i$ < n; ++i$) {
17 results$.push(x);
18 }
19 return results$;
20});
21Str.empty = List.empty;
22Str.slice = List.slice;
23Str.take = List.take;
24Str.drop = List.drop;
25Str.splitAt = List.splitAt;
26Str.takeWhile = List.takeWhile;
27Str.dropWhile = List.dropWhile;
28Str.span = List.span;
29Str.breakStr = List.breakList;
30prelude = {
31 Func: Func,
32 List: List,
33 Obj: Obj,
34 Str: Str,
35 Num: Num,
36 id: id,
37 isType: isType,
38 replicate: replicate
39};
40prelude.each = List.each;
41prelude.map = List.map;
42prelude.filter = List.filter;
43prelude.compact = List.compact;
44prelude.reject = List.reject;
45prelude.partition = List.partition;
46prelude.find = List.find;
47prelude.head = List.head;
48prelude.first = List.first;
49prelude.tail = List.tail;
50prelude.last = List.last;
51prelude.initial = List.initial;
52prelude.empty = List.empty;
53prelude.reverse = List.reverse;
54prelude.difference = List.difference;
55prelude.intersection = List.intersection;
56prelude.union = List.union;
57prelude.countBy = List.countBy;
58prelude.groupBy = List.groupBy;
59prelude.fold = List.fold;
60prelude.foldl = List.foldl;
61prelude.fold1 = List.fold1;
62prelude.foldl1 = List.foldl1;
63prelude.foldr = List.foldr;
64prelude.foldr1 = List.foldr1;
65prelude.unfoldr = List.unfoldr;
66prelude.andList = List.andList;
67prelude.orList = List.orList;
68prelude.any = List.any;
69prelude.all = List.all;
70prelude.unique = List.unique;
71prelude.uniqueBy = List.uniqueBy;
72prelude.sort = List.sort;
73prelude.sortWith = List.sortWith;
74prelude.sortBy = List.sortBy;
75prelude.sum = List.sum;
76prelude.product = List.product;
77prelude.mean = List.mean;
78prelude.average = List.average;
79prelude.concat = List.concat;
80prelude.concatMap = List.concatMap;
81prelude.flatten = List.flatten;
82prelude.maximum = List.maximum;
83prelude.minimum = List.minimum;
84prelude.maximumBy = List.maximumBy;
85prelude.minimumBy = List.minimumBy;
86prelude.scan = List.scan;
87prelude.scanl = List.scanl;
88prelude.scan1 = List.scan1;
89prelude.scanl1 = List.scanl1;
90prelude.scanr = List.scanr;
91prelude.scanr1 = List.scanr1;
92prelude.slice = List.slice;
93prelude.take = List.take;
94prelude.drop = List.drop;
95prelude.splitAt = List.splitAt;
96prelude.takeWhile = List.takeWhile;
97prelude.dropWhile = List.dropWhile;
98prelude.span = List.span;
99prelude.breakList = List.breakList;
100prelude.zip = List.zip;
101prelude.zipWith = List.zipWith;
102prelude.zipAll = List.zipAll;
103prelude.zipAllWith = List.zipAllWith;
104prelude.at = List.at;
105prelude.elemIndex = List.elemIndex;
106prelude.elemIndices = List.elemIndices;
107prelude.findIndex = List.findIndex;
108prelude.findIndices = List.findIndices;
109prelude.apply = Func.apply;
110prelude.curry = Func.curry;
111prelude.flip = Func.flip;
112prelude.fix = Func.fix;
113prelude.over = Func.over;
114prelude.split = Str.split;
115prelude.join = Str.join;
116prelude.lines = Str.lines;
117prelude.unlines = Str.unlines;
118prelude.words = Str.words;
119prelude.unwords = Str.unwords;
120prelude.chars = Str.chars;
121prelude.unchars = Str.unchars;
122prelude.repeat = Str.repeat;
123prelude.capitalize = Str.capitalize;
124prelude.camelize = Str.camelize;
125prelude.dasherize = Str.dasherize;
126prelude.values = Obj.values;
127prelude.keys = Obj.keys;
128prelude.pairsToObj = Obj.pairsToObj;
129prelude.objToPairs = Obj.objToPairs;
130prelude.listsToObj = Obj.listsToObj;
131prelude.objToLists = Obj.objToLists;
132prelude.max = Num.max;
133prelude.min = Num.min;
134prelude.negate = Num.negate;
135prelude.abs = Num.abs;
136prelude.signum = Num.signum;
137prelude.quot = Num.quot;
138prelude.rem = Num.rem;
139prelude.div = Num.div;
140prelude.mod = Num.mod;
141prelude.recip = Num.recip;
142prelude.pi = Num.pi;
143prelude.tau = Num.tau;
144prelude.exp = Num.exp;
145prelude.sqrt = Num.sqrt;
146prelude.ln = Num.ln;
147prelude.pow = Num.pow;
148prelude.sin = Num.sin;
149prelude.tan = Num.tan;
150prelude.cos = Num.cos;
151prelude.acos = Num.acos;
152prelude.asin = Num.asin;
153prelude.atan = Num.atan;
154prelude.atan2 = Num.atan2;
155prelude.truncate = Num.truncate;
156prelude.round = Num.round;
157prelude.ceiling = Num.ceiling;
158prelude.floor = Num.floor;
159prelude.isItNaN = Num.isItNaN;
160prelude.even = Num.even;
161prelude.odd = Num.odd;
162prelude.gcd = Num.gcd;
163prelude.lcm = Num.lcm;
164prelude.VERSION = '1.2.1';
165module.exports = prelude;
166function curry$(f, bound){
167 var context,
168 _curry = function(args) {
169 return f.length > 1 ? function(){
170 var params = args ? args.concat() : [];
171 context = bound ? context || this : this;
172 return params.push.apply(params, arguments) <
173 f.length && arguments.length ?
174 _curry.call(context, params) : f.apply(context, params);
175 } : f;
176 };
177 return _curry();
178}
\No newline at end of file