-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathramda.ts
70 lines (68 loc) · 2.5 KB
/
ramda.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// @ts-ignore
import { curry, CurriedFunction2 } from "ramda";
import * as L from "./index";
export { Node, List, list } from "./index";
export const prepend = curry(L.prepend);
export const isList = curry(L.isList);
export const append = curry(L.append);
export const of = curry(L.of);
export const pair = curry(L.pair);
export const empty = curry(L.empty);
export const repeat = curry(L.repeat);
export const times = curry(L.times);
export const length = curry(L.length);
export const first = curry(L.first);
export const head = first;
export const last = curry(L.last);
export const nth = curry(L.nth);
export const map = curry(L.map);
export const forEach = curry(L.forEach);
export const pluck = curry(L.pluck as (<A>(key: string, l: L.List<A>) => A));
export const range = curry(L.range);
export const foldl = curry(L.foldl);
export const reduce = foldl;
export const filter = curry(L.filter);
export const reject = curry(L.reject);
export const partition = curry(L.partition);
export const join = curry(L.join);
export const foldr = curry(L.foldr);
export const reduceRight = foldr;
export const ap = curry(L.ap);
export const chain = curry(L.chain);
export const flatten = curry(L.flatten);
export const every = curry(L.every);
export const all = every;
export const some = curry(L.some);
export const any = some;
export const none = curry(L.none);
export const find = curry(L.find);
export const indexOf = curry(L.indexOf);
export const findIndex = curry(L.findIndex);
export const includes = curry(L.includes);
export const contains = includes;
export const equals = curry(L.equals);
export const concat = curry(L.concat);
export const update = curry(L.update);
export const adjust = curry(L.adjust);
export const slice = curry(L.slice);
export const take = curry(L.take);
export const takeWhile = curry(L.takeWhile);
export const dropWhile = curry(L.dropWhile);
export const takeLast = curry(L.takeLast);
export const splitAt = curry(L.splitAt);
export const remove = curry(L.remove);
export const reverse = curry(L.reverse);
export const drop = curry(L.drop);
export const dropLast = curry(L.dropLast);
export const pop = curry(L.pop);
export const init = pop;
export const tail = curry(L.tail);
export const toArray = curry(L.toArray);
export const from = curry(L.from);
export const insert = curry(L.insert);
export const insertAll = curry(L.insertAll);
export const zip = curry(L.zip);
export const zipWith = curry(L.zipWith);
export const sort = curry(L.sort);
export const sortWith = curry(L.sortWith);
export const sortBy = curry(L.sortBy);