git.fiddlerwoaroof.com
Browse code

Add flow configuration

Ed Langley authored on 15/06/2017 18:04:19
Showing 4 changed files
... ...
@@ -3,5 +3,6 @@
3 3
 [include]
4 4
 
5 5
 [libs]
6
+flow-typed/npm/ramda_v0.x.x.js
6 7
 
7 8
 [options]
8 9
new file mode 100644
... ...
@@ -0,0 +1,775 @@
1
+// flow-typed signature: dfe9e7dd59fee10f50e3604dd5cab0f8
2
+// flow-typed version: a9e64f6272/ramda_v0.x.x/flow_>=v0.34.x
3
+
4
+/* eslint-disable no-unused-vars, no-redeclare */
5
+
6
+type Transformer<A,B> = {
7
+  '@@transducer/step': <I,R>(r: A, a: *) => R,
8
+  '@@transducer/init': () => A,
9
+  '@@transducer/result': (result: *) => B
10
+}
11
+
12
+
13
+declare module ramda {
14
+  declare type UnaryFn<A,R> = (a: A) => R;
15
+  declare type BinaryFn<A,B,R> = ((a: A, b: B) => R) & ((a:A) => (b: B) => R);
16
+  declare type UnarySameTypeFn<T> = UnaryFn<T,T>
17
+  declare type BinarySameTypeFn<T> = BinaryFn<T,T,T>
18
+  declare type NestedObject<T> = { [k: string]: T | NestedObject<T> }
19
+  declare type UnaryPredicateFn<T> = (x:T) => boolean
20
+  declare type BinaryPredicateFn<T> = (x:T, y:T) => boolean
21
+  declare type BinaryPredicateFn2<T,S> = (x:T, y:S) => boolean
22
+
23
+  declare interface ObjPredicate {
24
+    (value: any, key: string): boolean;
25
+  }
26
+
27
+  declare type CurriedFunction2<T1, T2, R> =
28
+    & ((t1: T1, t2: T2) => R)
29
+    & ((t1: T1, ...rest: Array<void>) => (t2: T2) => R)
30
+
31
+  declare type CurriedFunction3<T1, T2, T3, R> =
32
+    & ((t1: T1, t2: T2, t3: T3) => R)
33
+    & ((t1: T1, t2: T2, ...rest: Array<void>) => (t3: T3) => R)
34
+    & ((t1: T1, ...rest: Array<void>) => CurriedFunction2<T2, T3, R>)
35
+
36
+  declare type CurriedFunction4<T1, T2, T3, T4, R> =
37
+    & ((t1: T1, t2: T2, t3: T3, t4: T4) => R)
38
+    & ((t1: T1, t2: T2, t3: T3, ...rest: Array<void>) => (t4: T4) => R)
39
+    & ((t1: T1, t2: T2, ...rest: Array<void>) => CurriedFunction2<T3, T4, R>)
40
+    & ((t1: T1, ...rest: Array<void>) => CurriedFunction3<T2, T3, T4, R>)
41
+
42
+  declare type CurriedFunction5<T1, T2, T3, T4, T5, R> =
43
+    & ((t1: T1) => CurriedFunction4<T2, T3, T4, T5, R>)
44
+    & ((t1: T1, t2: T2) => CurriedFunction3<T3, T4, T5, R>)
45
+    & ((t1: T1, t2: T2, t3: T3) => CurriedFunction2<T4, T5, R>)
46
+    & ((t1: T1, t2: T2, t3: T3, t4: T4) => (t5: T5) => R)
47
+    & ((t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R)
48
+
49
+  declare type CurriedFunction6<T1, T2, T3, T4, T5, T6, R> =
50
+    & ((t1: T1) => CurriedFunction5<T2, T3, T4, T5, T6, R>)
51
+    & ((t1: T1, t2: T2) => CurriedFunction4<T3, T4, T5, T6, R>)
52
+    & ((t1: T1, t2: T2, t3: T3) => CurriedFunction3<T4, T5, T6, R>)
53
+    & ((t1: T1, t2: T2, t3: T3, t4: T4) => CurriedFunction2<T5, T6, R>)
54
+    & ((t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => (t6: T6) => R)
55
+    & ((t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6) => R)
56
+
57
+  declare type Pipe = (<A,B,C,D,E,F,G>(ab: UnaryFn<A,B>, bc: UnaryFn<B,C>, cd: UnaryFn<C,D>, de: UnaryFn<D,E>, ef: UnaryFn<E,F>, fg: UnaryFn<F,G>, ...rest: Array<void>) => UnaryFn<A,G>)
58
+    & (<A,B,C,D,E,F>(ab: UnaryFn<A,B>, bc: UnaryFn<B,C>, cd: UnaryFn<C,D>, de: UnaryFn<D,E>, ef: UnaryFn<E,F>, ...rest: Array<void>) => UnaryFn<A,F>)
59
+    & (<A,B,C,D,E>(ab: UnaryFn<A,B>, bc: UnaryFn<B,C>, cd: UnaryFn<C,D>, de: UnaryFn<D,E>, ...rest: Array<void>) => UnaryFn<A,E>)
60
+    & (<A,B,C,D>(ab: UnaryFn<A,B>, bc: UnaryFn<B,C>, cd: UnaryFn<C,D>, ...rest: Array<void>) => UnaryFn<A,D>)
61
+    & (<A,B,C>(ab: UnaryFn<A,B>, bc: UnaryFn<B,C>, ...rest: Array<void>) => UnaryFn<A,C>)
62
+    & (<A,B>(ab: UnaryFn<A,B>, ...rest: Array<void>) => UnaryFn<A,B>)
63
+
64
+  declare type Compose = & (<A,B,C,D,E,F,G>(fg: UnaryFn<F,G>, ef: UnaryFn<E,F>, de: UnaryFn<D,E>, cd: UnaryFn<C,D>, bc: UnaryFn<B,C>, ab: UnaryFn<A,B>, ...rest: Array<void>) => UnaryFn<A,G>)
65
+    & (<A,B,C,D,E,F>(ef: UnaryFn<E,F>, de: UnaryFn<D,E>, cd: UnaryFn<C,D>, bc: UnaryFn<B,C>, ab: UnaryFn<A,B>, ...rest: Array<void>) => UnaryFn<A,F>)
66
+    & (<A,B,C,D,E>(de: UnaryFn<D,E>, cd: UnaryFn<C,D>, bc: UnaryFn<B,C>, ab: UnaryFn<A,B>, ...rest: Array<void>) => UnaryFn<A,E>)
67
+    & (<A,B,C,D>(cd: UnaryFn<C,D>, bc: UnaryFn<B,C>, ab: UnaryFn<A,B>, ...rest: Array<void>) => UnaryFn<A,D>)
68
+    & (<A,B,C>(bc: UnaryFn<B,C>, ab: UnaryFn<A,B>, ...rest: Array<void>) => UnaryFn<A,C>)
69
+    & (<A,B>(ab: UnaryFn<A,B>, ...rest: Array<void>) => UnaryFn<A,B>)
70
+
71
+  declare type Curry = & (<T1, T2, TResult>(fn: (a: T1, b: T2) => TResult) => CurriedFunction2<T1,T2, TResult>)
72
+    & (<T1, T2, T3, TResult>(fn: (a: T1, b: T2, c: T3) => TResult) => CurriedFunction3<T1,T2, T3, TResult>)
73
+    & (<T1, T2, T3, T4, TResult>(fn: (a: T1, b: T2, c: T3, d: T4) => TResult) => CurriedFunction4<T1,T2, T3, T4, TResult>)
74
+    & (<T1, T2, T3, T4, T5, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => TResult) => CurriedFunction5<T1,T2, T3, T4, T5, TResult>)
75
+    & (<T1, T2, T3, T4, T5, T6, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6) => TResult) => CurriedFunction6<T1,T2, T3, T4, T5, T6, TResult>)
76
+    & ((fn: Function) => Function)
77
+
78
+  declare type Filter =
79
+    & (<K,V,T:Array<V>|{[key:K]:V}>(fn: UnaryPredicateFn<V>, xs:T) => T)
80
+    & (<K,V,T:Array<V>|{[key:K]:V}>(fn: UnaryPredicateFn<V>) => (xs:T) => T)
81
+
82
+
83
+  declare class Monad<T> {
84
+    chain: Function
85
+  }
86
+
87
+  declare class Semigroup<T> {}
88
+
89
+  declare class Chain {
90
+    chain<T,V: Monad<T>|Array<T>>(fn: (a:T) => V, x: V): V;
91
+    chain<T,V: Monad<T>|Array<T>>(fn: (a:T) => V): (x: V) => V;
92
+  }
93
+
94
+  declare class GenericContructor<T> {
95
+    constructor(x: T): GenericContructor<any>
96
+  }
97
+
98
+  declare class GenericContructorMulti {
99
+    constructor(...args: Array<any>): GenericContructor<any>
100
+  }
101
+
102
+
103
+  /**
104
+  * DONE:
105
+  * Function*
106
+  * List*
107
+  * Logic
108
+  * Math
109
+  * Object*
110
+  * Relation
111
+  * String
112
+  * Type
113
+  */
114
+
115
+  declare var compose: Compose;
116
+  declare var pipe: Pipe;
117
+  declare var curry: Curry;
118
+  declare function curryN(length: number, fn: (...args: Array<any>) => any): Function
119
+
120
+  // *Math
121
+  declare var add: CurriedFunction2<number,number,number>;
122
+  declare var inc: UnaryFn<number,number>;
123
+  declare var dec: UnaryFn<number,number>;
124
+  declare var mean: UnaryFn<Array<number>,number>;
125
+  declare var divide: CurriedFunction2<number,number,number>
126
+  declare var mathMod: CurriedFunction2<number,number,number>;
127
+  declare var median: UnaryFn<Array<number>,number>;
128
+  declare var modulo: CurriedFunction2<number,number,number>;
129
+  declare var multiply: CurriedFunction2<number,number,number>;
130
+  declare var negate: UnaryFn<number,number>;
131
+  declare var product: UnaryFn<Array<number>,number>;
132
+  declare var subtract: CurriedFunction2<number,number,number>;
133
+  declare var sum: UnaryFn<Array<number>,number>;
134
+
135
+  // Filter
136
+  declare var filter: Filter;
137
+  declare var reject: Filter;
138
+
139
+  // *String
140
+  declare var match: CurriedFunction2<RegExp,string,Array<string|void>>;
141
+  declare var replace: CurriedFunction3<RegExp|string,string,string,string>;
142
+  declare var split: CurriedFunction2<RegExp|string,string,Array<string>>
143
+  declare var test: CurriedFunction2<RegExp,string,boolean>
144
+  declare function toLower(a: string): string;
145
+  declare function toString(a: any): string;
146
+  declare function toUpper(a: string): string;
147
+  declare function trim(a: string): string;
148
+
149
+  // *Type
150
+  declare function is<T>(t: T, ...rest: Array<void>): (v: any) => boolean;
151
+  declare function is<T>(t: T, v: any): boolean;
152
+  declare var propIs: CurriedFunction3<any,string,Object,boolean>;
153
+  declare function type(x: ?any): string;
154
+  declare function isArrayLike(x: any): boolean;
155
+  declare function isNil(x: ?any): boolean;
156
+
157
+  // *List
158
+  declare function adjust<T>(fn:(a: T) => T, ...rest: Array<void>): (index: number, ...rest: Array<void>) => (src: Array<T>) => Array<T>;
159
+  declare function adjust<T>(fn:(a: T) => T, index: number, ...rest: Array<void>): (src: Array<T>) => Array<T>;
160
+  declare function adjust<T>(fn:(a: T) => T, index: number, src: Array<T>): Array<T>;
161
+
162
+  declare function all<T>(fn: UnaryPredicateFn<T>, xs: Array<T>): boolean;
163
+  declare function all<T>(fn: UnaryPredicateFn<T>, ...rest: Array<void>): (xs: Array<T>) => boolean;
164
+
165
+  declare function any<T>(fn: UnaryPredicateFn<T>, xs: Array<T>): boolean;
166
+  declare function any<T>(fn: UnaryPredicateFn<T>, ...rest: Array<void>): (xs: Array<T>) => boolean;
167
+
168
+  declare function aperture<T>(n: number, xs: Array<T>): Array<Array<T>>;
169
+  declare function aperture<T>(n: number, ...rest: Array<void>): (xs: Array<T>) => Array<Array<T>>;
170
+
171
+  declare function append<E>(x: E, xs: Array<E>): Array<E>
172
+  declare function append<E>(x: E, ...rest: Array<void>): (xs: Array<E>) => Array<E>
173
+
174
+  declare function prepend<E>(x: E, xs: Array<E>): Array<E>
175
+  declare function prepend<E>(x: E, ...rest: Array<void>): (xs: Array<E>) => Array<E>
176
+
177
+  declare function concat<V,T:Array<V>|string>(x: T, y: T): T;
178
+  declare function concat<V,T:Array<V>|string>(x: T): (y: T) => T;
179
+
180
+  declare function contains<E,T:Array<E>|string>(x: E, xs: T): boolean
181
+  declare function contains<E,T:Array<E>|string>(x: E, ...rest: Array<void>): (xs: T) => boolean
182
+
183
+  declare function drop<V,T:Array<V>|string>(n: number, ...rest: Array<void>):(xs: T) => T;
184
+  declare function drop<V,T:Array<V>|string>(n: number, xs: T): T;
185
+
186
+  declare function dropLast<V,T:Array<V>|string>(n: number, ...rest: Array<void>):(xs: T) => T;
187
+  declare function dropLast<V,T:Array<V>|string>(n: number, xs: T): T;
188
+
189
+  declare function dropLastWhile<V,T:Array<V>>(fn: UnaryPredicateFn<V>, ...rest: Array<void>): (xs:T) => T;
190
+  declare function dropLastWhile<V,T:Array<V>>(fn: UnaryPredicateFn<V>, xs:T): T;
191
+
192
+  declare function dropWhile<V,T:Array<V>>(fn: UnaryPredicateFn<V>, ...rest: Array<void>): (xs:T) => T;
193
+  declare function dropWhile<V,T:Array<V>>(fn: UnaryPredicateFn<V>, xs:T): T;
194
+
195
+  declare function dropRepeats<V,T:Array<V>>(xs:T): T;
196
+
197
+  declare function dropRepeatsWith<V,T:Array<V>>(fn: BinaryPredicateFn<V>, ...rest: Array<void>): (xs:T) => T;
198
+  declare function dropRepeatsWith<V,T:Array<V>>(fn: BinaryPredicateFn<V>, xs:T): T;
199
+
200
+  declare function groupBy<T>(fn: (x: T) => string, xs: Array<T>): {[key: string]: Array<T>}
201
+  declare function groupBy<T>(fn: (x: T) => string, ...rest: Array<void>): (xs: Array<T>) => {[key: string]: Array<T>}
202
+
203
+  declare function groupWith<T,V:Array<T>|string>(fn: BinaryPredicateFn<T>, xs: V): Array<V>
204
+  declare function groupWith<T,V:Array<T>|string>(fn: BinaryPredicateFn<T>, ...rest: Array<void>): (xs: V) => Array<V>
205
+
206
+  declare function head<T,V:Array<T>>(xs: V): ?T
207
+  declare function head<T,V:string>(xs: V): V
208
+
209
+  declare function into<I,T,A:Array<T>,R:Array<*>|string|Object>(accum: R, xf: (a: A) => I, input: A): R
210
+  declare function into<I,T,A:Array<T>,R>(accum: Transformer<I,R>, xf: (a: A) => R, input: A): R
211
+
212
+  declare function indexOf<E>(x: E, xs: Array<E>): number
213
+  declare function indexOf<E>(x: E, ...rest: Array<void>): (xs: Array<E>) => number
214
+
215
+  declare function indexBy<V,T:{[key: string]:*}>(fn: (x: T) => string, ...rest: Array<void>): (xs: Array<T>) => {[key: string]: T}
216
+  declare function indexBy<V,T:{[key: string]:*}>(fn: (x: T) => string, xs: Array<T>): {[key: string]: T}
217
+
218
+  declare function insert<T>(index: number, ...rest: Array<void>): (elem: T) => (src: Array<T>) => Array<T>
219
+  declare function insert<T>(index: number, elem: T, ...rest: Array<void>): (src: Array<T>) => Array<T>
220
+  declare function insert<T>(index: number, elem: T, src: Array<T>): Array<T>
221
+
222
+  declare function insertAll<T,S>(index: number, ...rest: Array<void>): (elem: Array<S>) => (src: Array<T>) => Array<S|T>
223
+  declare function insertAll<T,S>(index: number, elems: Array<S>, ...rest: Array<void>): (src: Array<T>) => Array<S|T>
224
+  declare function insertAll<T,S>(index: number, elems: Array<S>, src: Array<T>): Array<S|T>
225
+
226
+  declare function join(x: string, xs: Array<any>): string
227
+  declare function join(x: string, ...rest: Array<void>): (xs: Array<any>) => string
228
+
229
+  declare function last<T,V:Array<T>>(xs: V): ?T
230
+  declare function last<T,V:string>(xs: V): V
231
+
232
+  declare function none<T>(fn: UnaryPredicateFn<T>, xs: Array<T>): boolean;
233
+  declare function none<T>(fn: UnaryPredicateFn<T>, ...rest: Array<void>): (xs: Array<T>) => boolean;
234
+
235
+  declare function nth<V,T:Array<V>>(i: number, xs: T): ?V
236
+  declare function nth<V,T:Array<V>|string>(i: number, ...rest: Array<void>): ((xs: string) => string)&((xs: T) => ?V)
237
+  declare function nth<T:string>(i: number, xs: T):  T
238
+
239
+  declare function find<V,O:{[key:string]:*},T:Array<V>|O>(fn: UnaryPredicateFn<V>, ...rest: Array<void>): (xs:T|O) => ?V|O;
240
+  declare function find<V,O:{[key:string]:*},T:Array<V>|O>(fn: UnaryPredicateFn<V>, xs:T|O): ?V|O;
241
+  declare function findLast<V,O:{[key:string]:*},T:Array<V>|O>(fn: UnaryPredicateFn<V>, ...rest: Array<void>): (xs:T|O) => ?V|O;
242
+  declare function findLast<V,O:{[key:string]:*},T:Array<V>|O>(fn: UnaryPredicateFn<V>, xs:T|O): ?V|O;
243
+
244
+  declare function findIndex<K,V,T:Array<V>|{[key:K]:V}>(fn: UnaryPredicateFn<V>, ...rest: Array<void>): (xs:T) => number
245
+  declare function findIndex<K,V,T:Array<V>|{[key:K]:V}>(fn: UnaryPredicateFn<V>, xs:T): number
246
+  declare function findLastIndex<K,V,T:Array<V>|{[key:K]:V}>(fn: UnaryPredicateFn<V>, ...rest: Array<void>): (xs:T) => number
247
+  declare function findLastIndex<K,V,T:Array<V>|{[key:K]:V}>(fn: UnaryPredicateFn<V>, xs:T): number
248
+
249
+  declare function forEach<T,V>(fn:(x:T) => ?V, xs: Array<T>): Array<T>
250
+  declare function forEach<T,V>(fn:(x:T) => ?V, ...rest: Array<void>): (xs: Array<T>) => Array<T>
251
+
252
+  declare function lastIndexOf<E>(x: E, xs: Array<E>): number
253
+  declare function lastIndexOf<E>(x: E, ...rest: Array<void>): (xs: Array<E>) => number
254
+
255
+  declare function map<T,R>(fn: (x:T) => R, xs: Array<T>): Array<R>;
256
+  declare function map<T,R,S:{map:Function}>(fn: (x:T) => R, xs: S): S;
257
+  declare function map<T,R>(fn: (x:T) => R, ...rest: Array<void>): ((xs: {[key: string]: T}) => {[key: string]: R}) & ((xs: Array<T>) => Array<R>)
258
+  declare function map<T,R,S:{map:Function}>(fn: (x:T) => R, ...rest: Array<void>): ((xs:S) => S) & ((xs: S) => S)
259
+  declare function map<T,R>(fn: (x:T) => R, xs: {[key: string]: T}): {[key: string]: R}
260
+
261
+  declare type AccumIterator<A,B,R> = (acc: R, x: A) => [R,B]
262
+  declare function mapAccum<A,B,R>(fn: AccumIterator<A,B,R>, acc: R, xs: Array<A>): [R, Array<B>];
263
+  declare function mapAccum<A,B,R>(fn: AccumIterator<A,B,R>, ...rest: Array<void>): (acc: R, xs: Array<A>) => [R, Array<B>];
264
+
265
+  declare function mapAccumRight<A,B,R>(fn: AccumIterator<A,B,R>, acc: R, xs: Array<A>): [R, Array<B>];
266
+  declare function mapAccumRight<A,B,R>(fn: AccumIterator<A,B,R>, ...rest: Array<void>): (acc: R, xs: Array<A>) => [R, Array<B>];
267
+
268
+  declare function intersperse<E>(x: E, xs: Array<E>): Array<E>
269
+  declare function intersperse<E>(x: E, ...rest: Array<void>): (xs: Array<E>) => Array<E>
270
+
271
+  declare function pair<A,B>(a:A, b:B): [A,B]
272
+  declare function pair<A,B>(a:A, ...rest: Array<void>): (b:B) => [A,B]
273
+
274
+  declare function partition<K,V,T:Array<V>|{[key:K]:V}>(fn: UnaryPredicateFn<V>, xs:T): [T,T]
275
+  declare function partition<K,V,T:Array<V>|{[key:K]:V}>(fn: UnaryPredicateFn<V>, ...rest: Array<void>): (xs:T) => [T,T]
276
+
277
+  declare function pluck<V,K:string|number,T:Array<Array<V>|{[key:string]:V}>>(k: K, xs: T): Array<V>
278
+  declare function pluck<V,K:string|number,T:Array<Array<V>|{[key:string]:V}>>(k: K,...rest: Array<void>): (xs: T) => Array<V>
279
+
280
+  declare var range: CurriedFunction2<number,number,Array<number>>;
281
+
282
+  declare function remove<T>(from: number, ...rest: Array<void>): ((to: number, ...rest: Array<void>) => (src: Array<T>) => Array<T>) & ((to: number, src: Array<T>) => Array<T>)
283
+  declare function remove<T>(from: number, to: number, ...rest: Array<void>): (src: Array<T>) => Array<T>
284
+  declare function remove<T>(from: number, to: number, src: Array<T>): Array<T>
285
+
286
+  declare function repeat<T>(x: T, times: number): Array<T>
287
+  declare function repeat<T>(x: T, ...rest: Array<void>): (times: number) => Array<T>
288
+
289
+  declare function slice<V,T:Array<V>|string>(from: number, ...rest: Array<void>): ((to: number, ...rest: Array<void>) => (src: T) => T) & ((to: number, src: T) => T)
290
+  declare function slice<V,T:Array<V>|string>(from: number, to: number, ...rest: Array<void>): (src: T) => T
291
+  declare function slice<V,T:Array<V>|string>(from: number, to: number, src: T): T
292
+
293
+  declare function sort<V,T:Array<V>>(fn: (a:V, b:V) => number, xs:T): T
294
+  declare function sort<V,T:Array<V>>(fn: (a:V, b:V) => number, ...rest: Array<void>): (xs:T) => T
295
+
296
+  declare function times<T>(fn:(i: number) => T, n: number): Array<T>
297
+  declare function times<T>(fn:(i: number) => T, ...rest: Array<void>): (n: number) => Array<T>
298
+
299
+  declare function take<V,T:Array<V>|string>(n: number, xs: T): T;
300
+  declare function take<V,T:Array<V>|string>(n: number):(xs: T) => T;
301
+
302
+  declare function takeLast<V,T:Array<V>|string>(n: number, xs: T): T;
303
+  declare function takeLast<V,T:Array<V>|string>(n: number):(xs: T) => T;
304
+
305
+  declare function takeLastWhile<V,T:Array<V>>(fn: UnaryPredicateFn<V>, xs:T): T;
306
+  declare function takeLastWhile<V,T:Array<V>>(fn: UnaryPredicateFn<V>): (xs:T) => T;
307
+
308
+  declare function takeWhile<V,T:Array<V>>(fn: UnaryPredicateFn<V>, xs:T): T;
309
+  declare function takeWhile<V,T:Array<V>>(fn: UnaryPredicateFn<V>): (xs:T) => T;
310
+
311
+  declare function unfold<T,R>(fn: (seed: T) => [R, T]|boolean, ...rest: Array<void>): (seed: T) => Array<R>
312
+  declare function unfold<T,R>(fn: (seed: T) => [R, T]|boolean, seed: T): Array<R>
313
+
314
+  declare function uniqBy<T,V>(fn:(x: T) => V, ...rest: Array<void>): (xs: Array<T>) => Array<T>
315
+  declare function uniqBy<T,V>(fn:(x: T) => V, xs: Array<T>): Array<T>
316
+
317
+  declare function uniqWith<T>(fn: BinaryPredicateFn<T>, ...rest: Array<void>): (xs: Array<T>) => Array<T>
318
+  declare function uniqWith<T>(fn: BinaryPredicateFn<T>, xs: Array<T>): Array<T>
319
+
320
+  declare function update<T>(index: number, ...rest: Array<void>): ((elem: T, ...rest: Array<void>) => (src: Array<T>) => Array<T>) & ((elem: T, src: Array<T>) => Array<T>)
321
+  declare function update<T>(index: number, elem: T, ...rest: Array<void>): (src: Array<T>) => Array<T>
322
+  declare function update<T>(index: number, elem: T, src: Array<T>): Array<T>
323
+
324
+  // TODO `without` as a transducer
325
+  declare function without<T>(xs: Array<T>, src: Array<T>): Array<T>
326
+  declare function without<T>(xs: Array<T>, ...rest: Array<void>): (src: Array<T>) => Array<T>
327
+
328
+  declare function xprod<T,S>(xs: Array<T>, ys: Array<S>): Array<[T,S]>
329
+  declare function xprod<T,S>(xs: Array<T>, ...rest: Array<void>): (ys: Array<S>) => Array<[T,S]>
330
+
331
+  declare function zip<T,S>(xs: Array<T>, ys: Array<S>): Array<[T,S]>
332
+  declare function zip<T,S>(xs: Array<T>, ...rest: Array<void>): (ys: Array<S>) => Array<[T,S]>
333
+
334
+  declare function zipObj<T:string,S>(xs: Array<T>, ys: Array<S>): {[key:T]:S}
335
+  declare function zipObj<T:string,S>(xs: Array<T>, ...rest: Array<void>): (ys: Array<S>) => {[key:T]:S}
336
+
337
+  declare type NestedArray<T> = Array<T | NestedArray<T>>
338
+  declare function flatten<T>(xs: NestedArray<T>): Array<T>;
339
+
340
+  declare function fromPairs<T,V>(pair: Array<[T,V]>): {[key: string]:V};
341
+
342
+  declare function init<T,V:Array<T>|string>(xs: V): V;
343
+
344
+  declare function length<T>(xs: Array<T>): number;
345
+
346
+  declare function mergeAll(objs: Array<{[key: string]: any}>):{[key: string]: any};
347
+
348
+  declare function reverse<T,V:Array<T>|string>(xs: V): V;
349
+
350
+  declare function reduce<A, B>(fn: (acc: A, elem: B) => A, ...rest: Array<void>): ((init: A, xs: Array<B>) => A) & ((init: A, ...rest: Array<void>) => (xs: Array<B>) => A);
351
+  declare function reduce<A, B>(fn: (acc: A, elem: B) => A, init: A, ...rest: Array<void>): (xs: Array<B>) => A;
352
+  declare function reduce<A, B>(fn: (acc: A, elem: B) => A, init: A, xs: Array<B>): A;
353
+
354
+  declare function reduceBy<A, B>(fn: (acc: B, elem: A) => B, ...rest: Array<void>):
355
+  ((acc: B, ...rest: Array<void>) => ((keyFn:(elem: A) => string, ...rest: Array<void>) => (xs: Array<A>) => {[key: string]: B}) & ((keyFn:(elem: A) => string, xs: Array<A>) => {[key: string]: B}))
356
+  & ((acc: B, keyFn:(elem: A) => string, ...rest: Array<void>) => (xs: Array<A>) => {[key: string]: B})
357
+  & ((acc: B, keyFn:(elem: A) => string, xs: Array<A>) => {[key: string]: B})
358
+  declare function reduceBy<A, B>(fn: (acc: B, elem: A) => B, acc: B, ...rest: Array<void>):
359
+  ((keyFn:(elem: A) => string, ...rest: Array<void>) => (xs: Array<A>) => {[key: string]: B})
360
+  & ((keyFn:(elem: A) => string, xs: Array<A>) => {[key: string]: B})
361
+  declare function reduceBy<A, B>(fn: (acc: B, elem: A) => B, acc: B, keyFn:(elem: A) => string): (xs: Array<A>) => {[key: string]: B};
362
+  declare function reduceBy<A, B>(fn: (acc: B, elem: A) => B, acc: B, keyFn:(elem: A) => string, xs: Array<A>): {[key: string]: B};
363
+
364
+  declare function reduceRight<A, B>(fn: (acc: A, elem: B) => A, ...rest: Array<void>): ((init: A, xs: Array<B>) => A) & ((init: A, ...rest: Array<void>) => (xs: Array<B>) => A);
365
+  declare function reduceRight<A, B>(fn: (acc: A, elem: B) => A, init: A, ...rest: Array<void>): (xs: Array<B>) => A;
366
+  declare function reduceRight<A, B>(fn: (acc: A, elem: B) => A, init: A, xs: Array<B>): A;
367
+
368
+  declare function scan<A, B>(fn: (acc: A, elem: B) => A, ...rest: Array<void>): ((init: A, xs: Array<B>) => A) & ((init: A, ...rest: Array<void>) => (xs: Array<B>) => A);
369
+  declare function scan<A, B>(fn: (acc: A, elem: B) => A, init: A, ...rest: Array<void>): (xs: Array<B>) => A;
370
+  declare function scan<A, B>(fn: (acc: A, elem: B) => A, init: A, xs: Array<B>): A;
371
+
372
+  declare function splitAt<V,T:Array<V>|string>(i: number, xs: T): [T,T];
373
+  declare function splitAt<V,T:Array<V>|string>(i: number): (xs: T) => [T,T];
374
+  declare function splitEvery<V,T:Array<V>|string>(i: number, xs: T): Array<T>;
375
+  declare function splitEvery<V,T:Array<V>|string>(i: number): (xs: T) => Array<T>;
376
+  declare function splitWhen<V,T:Array<V>>(fn: UnaryPredicateFn<V>, xs:T): [T,T];
377
+  declare function splitWhen<V,T:Array<V>>(fn: UnaryPredicateFn<V>): (xs:T) => [T,T];
378
+
379
+  declare function tail<T,V:Array<T>|string>(xs: V): V;
380
+
381
+  declare function transpose<T>(xs: Array<Array<T>>): Array<Array<T>>;
382
+
383
+  declare function uniq<T>(xs: Array<T>): Array<T>;
384
+
385
+  declare function unnest<T>(xs: NestedArray<T>): NestedArray<T>;
386
+
387
+  declare function zipWith<T,S,R>(fn: (a: T, b: S) => R, ...rest: Array<void>): ((xs: Array<T>, ys: Array<S>) => Array<R>) & ((xs: Array<T>, ...rest: Array<void> ) => (ys: Array<S>) => Array<R>)
388
+  declare function zipWith<T,S,R>(fn: (a: T, b: S) => R, xs: Array<T>, ...rest: Array<void>): (ys: Array<S>) => Array<R>;
389
+  declare function zipWith<T,S,R>(fn: (a: T, b: S) => R, xs: Array<T>, ys: Array<S>): Array<R>;
390
+
391
+  // *Relation
392
+  declare function equals<T>(x: T, ...rest: Array<void>): (y: T) => boolean;
393
+  declare function equals<T>(x: T, y: T): boolean;
394
+
395
+  declare function eqBy<A,B>(fn: (x: A) => B, ...rest: Array<void>): ((x: A, y: A) => boolean) & ((x: A, ...rest: Array<void>) => (y: A) => boolean);
396
+  declare function eqBy<A,B>(fn: (x: A) => B, x: A, ...rest: Array<void>): (y: A) => boolean;
397
+  declare function eqBy<A,B>(fn: (x: A) => B, x: A, y: A): boolean;
398
+
399
+  declare function propEq(prop: string, ...rest: Array<void>): ((val: *, o: {[k:string]: *}) => boolean) & ((val: *, ...rest: Array<void>) => (o: {[k:string]: *}) => boolean)
400
+  declare function propEq(prop: string, val: *, ...rest: Array<void>): (o: {[k:string]: *}) => boolean;
401
+  declare function propEq(prop: string, val: *, o: {[k:string]:*}): boolean;
402
+
403
+  declare function pathEq(path: Array<string>, ...rest: Array<void>): ((val: any, o: Object) => boolean) & ((val: any, ...rest: Array<void>) => (o: Object) => boolean);
404
+  declare function pathEq(path: Array<string>, val: any, ...rest: Array<void>): (o: Object) => boolean;
405
+  declare function pathEq(path: Array<string>, val: any, o: Object): boolean;
406
+
407
+  declare function clamp<T:number|string|Date>(min: T, ...rest: Array<void>):
408
+    ((max: T, ...rest: Array<void>) => (v: T) => T) & ((max: T, v: T) => T);
409
+  declare function clamp<T:number|string|Date>(min: T, max: T, ...rest: Array<void>): (v: T) => T;
410
+  declare function clamp<T:number|string|Date>(min: T, max: T, v: T): T;
411
+
412
+  declare function countBy<T>(fn: (x: T) => string, ...rest: Array<void>): (list: Array<T>) => {[key: string]: number};
413
+  declare function countBy<T>(fn: (x: T) => string, list: Array<T>): {[key: string]: number};
414
+
415
+  declare function difference<T>(xs1: Array<T>, ...rest: Array<void>): (xs2: Array<T>) => Array<T>;
416
+  declare function difference<T>(xs1: Array<T>, xs2: Array<T>): Array<T>;
417
+
418
+  declare function differenceWith<T>(fn: BinaryPredicateFn<T>, ...rest: Array<void>): ((xs1: Array<T>) => (xs2: Array<T>) => Array<T>) & ((xs1: Array<T>, xs2: Array<T>) => Array<T>);
419
+  declare function differenceWith<T>(fn: BinaryPredicateFn<T>, xs1: Array<T>, ...rest: Array<void>): (xs2: Array<T>) => Array<T>;
420
+  declare function differenceWith<T>(fn: BinaryPredicateFn<T>, xs1: Array<T>, xs2: Array<T>): Array<T>;
421
+
422
+  declare function eqBy<T>(fn: (x: T) => T, x: T, y: T): boolean;
423
+  declare function eqBy<T>(fn: (x: T) => T): (x: T, y: T) => boolean;
424
+  declare function eqBy<T>(fn: (x: T) => T, x: T): (y: T) => boolean;
425
+  declare function eqBy<T>(fn: (x: T) => T): (x: T) => (y: T) => boolean;
426
+
427
+  declare function gt<T>(x: T, ...rest: Array<void>): (y: T) => boolean;
428
+  declare function gt<T>(x: T, y: T): boolean;
429
+
430
+  declare function gte<T>(x: T, ...rest: Array<void>): (y: T) => boolean;
431
+  declare function gte<T>(x: T, y: T): boolean;
432
+
433
+  declare function identical<T>(x: T, ...rest: Array<void>): (y: T) => boolean;
434
+  declare function identical<T>(x: T, y: T): boolean;
435
+
436
+  declare function intersection<T>(x: Array<T>, y: Array<T>): Array<T>;
437
+  declare function intersection<T>(x: Array<T>): (y: Array<T>) => Array<T>;
438
+
439
+  declare function intersectionWith<T>(fn: BinaryPredicateFn<T>, ...rest: Array<void>): ((x: Array<T>, y: Array<T>) => Array<T>) & ((x: Array<T>) => (y: Array<T>) => Array<T>);
440
+  declare function intersectionWith<T>(fn: BinaryPredicateFn<T>, x: Array<T>, ...rest: Array<void>): (y: Array<T>) => Array<T>;
441
+  declare function intersectionWith<T>(fn: BinaryPredicateFn<T>, x: Array<T>, y: Array<T>): Array<T>;
442
+
443
+  declare function lt<T>(x: T, ...rest: Array<void>): (y: T) => boolean;
444
+  declare function lt<T>(x: T, y: T): boolean;
445
+
446
+  declare function lte<T>(x: T, ...rest: Array<void>): (y: T) => boolean;
447
+  declare function lte<T>(x: T, y: T): boolean;
448
+
449
+  declare function max<T>(x: T, ...rest: Array<void>): (y: T) => T;
450
+  declare function max<T>(x: T, y: T): T;
451
+
452
+  declare function maxBy<T,V>(fn: (x:T) => V, ...rest: Array<void>): ((x: T, y: T) => T) & ((x: T) => (y: T) => T);
453
+  declare function maxBy<T,V>(fn: (x:T) => V, x: T, ...rest: Array<void>): (y: T) => T;
454
+  declare function maxBy<T,V>(fn: (x:T) => V, x: T, y: T): T;
455
+
456
+  declare function min<T>(x: T, ...rest: Array<void>): (y: T) => T;
457
+  declare function min<T>(x: T, y: T): T;
458
+
459
+  declare function minBy<T,V>(fn: (x:T) => V, ...rest: Array<void>): ((x: T, y: T) => T) & ((x: T) => (y: T) => T);
460
+  declare function minBy<T,V>(fn: (x:T) => V, x: T, ...rest: Array<void>): (y: T) => T;
461
+  declare function minBy<T,V>(fn: (x:T) => V, x: T, y: T): T;
462
+
463
+  // TODO: sortBy: Started failing in v38...
464
+  // declare function sortBy<T,V>(fn: (x:T) => V, ...rest: Array<void>): (x: Array<T>) => Array<T>;
465
+  // declare function sortBy<T,V>(fn: (x:T) => V, x: Array<T>): Array<T>;
466
+
467
+  declare function symmetricDifference<T>(x: Array<T>, ...rest: Array<void>): (y: Array<T>) => Array<T>;
468
+  declare function symmetricDifference<T>(x: Array<T>, y: Array<T>): Array<T>;
469
+
470
+  declare function symmetricDifferenceWith<T>(fn: BinaryPredicateFn<T>, ...rest: Array<void>): ((x: Array<T>, ...rest: Array<void>) => (y: Array<T>) => Array<T>) & ((x: Array<T>, y: Array<T>) => Array<T>);
471
+  declare function symmetricDifferenceWith<T>(fn: BinaryPredicateFn<T>, x: Array<T>, ...rest: Array<void>): (y: Array<T>) => Array<T>;
472
+  declare function symmetricDifferenceWith<T>(fn: BinaryPredicateFn<T>, x: Array<T>, y: Array<T>): Array<T>;
473
+
474
+  declare function union<T>(x: Array<T>, ...rest: Array<void>): (y: Array<T>) => Array<T>;
475
+  declare function union<T>(x: Array<T>, y: Array<T>): Array<T>;
476
+
477
+  declare function unionWith<T>(fn: BinaryPredicateFn<T>, ...rest: Array<void>): ((x: Array<T>, ...rest: Array<void>) => (y: Array<T>) => Array<T>) & (x: Array<T>, y: Array<T>) => Array<T>;
478
+  declare function unionWith<T>(fn: BinaryPredicateFn<T>, x: Array<T>, ...rest: Array<void>): (y: Array<T>) => Array<T>;
479
+  declare function unionWith<T>(fn: BinaryPredicateFn<T>, x: Array<T>, y: Array<T>): Array<T>;
480
+
481
+  // *Object
482
+  declare function assoc<T,S>(key: string, ...args: Array<void>):
483
+    ((val: T, ...rest: Array<void>) => (src: {[k:string]:S}) => {[k:string]:S|T}) & ((val: T, src: {[k:string]:S}) => {[k:string]:S|T});
484
+  declare function assoc<T,S>(key: string, val:T, ...args: Array<void>): (src: {[k:string]:S}) => {[k:string]:S|T};
485
+  declare function assoc<T,S>(key: string, val: T, src: {[k:string]:S}): {[k:string]:S|T};
486
+
487
+  declare function assocPath<T,S>(key: Array<string>, ...args: Array<void>):
488
+    ((val: T, ...rest: Array<void>) => (src: {[k:string]:S}) => {[k:string]:S|T})
489
+    & ((val: T) => (src: {[k:string]:S}) => {[k:string]:S|T});
490
+  declare function assocPath<T,S>(key: Array<string>, val:T, ...args: Array<void>): (src: {[k:string]:S}) => {[k:string]:S|T};
491
+  declare function assocPath<T,S>(key: Array<string>, val:T, src: {[k:string]:S}): {[k:string]:S|T};
492
+
493
+  declare function clone<T>(src: T): $Shape<T>;
494
+
495
+  declare function dissoc<T>(key: string, ...args: Array<void>):
496
+    ((val: T, ...rest: Array<void>) => (src: {[k:string]:T}) => {[k:string]:T}) & ((val: T, src: {[k:string]:T}) => {[k:string]:T});
497
+  declare function dissoc<T>(key: string, val:T, ...args: Array<void>): (src: {[k:string]:T}) => {[k:string]:T};
498
+  declare function dissoc<T>(key: string, val: T, src: {[k:string]:T}): {[k:string]:T};
499
+
500
+  declare function dissocPath<T>(key: Array<string>, ...args: Array<void>):
501
+    ((val: T, ...rest: Array<void>) => (src: {[k:string]:T}) => {[k:string]:T})
502
+    & ((val: T) => (src: {[k:string]:T}) => {[k:string]:T});
503
+  declare function dissocPath<T>(key: Array<string>, val:T, ...args: Array<void>): (src: {[k:string]:T}) => {[k:string]:T};
504
+  declare function dissocPath<T>(key: Array<string>, val:T, src: {[k:string]:T}): {[k:string]:T};
505
+
506
+  // TODO: Started failing in v31... (Attempt to fix below)
507
+  // declare type __UnwrapNestedObjectR<T, U, V: NestedObject<(t: T) => U>> = U
508
+  // declare type UnwrapNestedObjectR<T> = UnwrapNestedObjectR<*, *, T>
509
+  //
510
+  // declare function evolve<R, T: NestedObject<(x:any) => R>>(fn: T, ...rest: Array<void>): (src: NestedObject<any>) => UnwrapNestedObjectR<T>;
511
+  // declare function evolve<R: NestedObject<(x:any) => R>>(fn: T, src: NestedObject<any>): UnwrapNestedObjectR<T>;
512
+
513
+  declare function eqProps(key: string, ...args: Array<void>):
514
+  ((o1: Object, ...rest: Array<void>) => (o2: Object) => boolean)
515
+  & ((o1: Object, o2: Object) => boolean);
516
+  declare function eqProps(key: string, o1: Object, ...args: Array<void>): (o2: Object) => boolean;
517
+  declare function eqProps(key: string, o1: Object, o2: Object): boolean;
518
+
519
+  declare function has(key: string, o: Object): boolean;
520
+  declare function has(key: string):(o: Object) => boolean;
521
+
522
+  declare function hasIn(key: string, o: Object): boolean;
523
+  declare function hasIn(key: string): (o: Object) => boolean;
524
+
525
+  declare function invert(o: Object): {[k: string]: Array<string>};
526
+  declare function invertObj(o: Object): {[k: string]: string};
527
+
528
+  declare function keys(o: Object): Array<string>;
529
+
530
+  /* TODO
531
+  lens
532
+  lensIndex
533
+  lensPath
534
+  lensProp
535
+  */
536
+
537
+  declare function mapObjIndexed<A,B>(fn: (val: A, key: string, o: Object) => B, o: {[key: string]: A}): {[key: string]: B};
538
+  declare function mapObjIndexed<A,B>(fn: (val: A, key: string, o: Object) => B, ...args: Array<void>): (o: {[key: string]: A}) => {[key: string]: B};
539
+
540
+  declare function merge<A,B>(o1: A, ...rest: Array<void>): (o2: B) => A & B;
541
+  declare function merge<A,B>(o1: A, o2: B): A & B;
542
+
543
+  declare function mergeAll<T>(os: Array<{[k:string]:T}>): {[k:string]:T};
544
+
545
+  declare function mergeWith<T,S,R,A:{[k:string]:T},B:{[k:string]:S}>(fn: (v1: T, v2: S) => R):
546
+  ((o1: A, ...rest: Array<void>) => (o2: B) => A & B) & ((o1: A, o2: B) => A & B);
547
+  declare function mergeWith<T,S,R,A:{[k:string]:T},B:{[k:string]:S}>(fn: (v1: T, v2: S) => R, o1: A, o2: B): A & B;
548
+  declare function mergeWith<T,S,R,A:{[k:string]:T},B:{[k:string]:S}>(fn: (v1: T, v2: S) => R, o1: A, ...rest: Array<void>): (o2: B) => A & B;
549
+
550
+  declare function mergeWithKey<T,S,R,A:{[k:string]:T},B:{[k:string]:S}>(fn: (key: $Keys<A&B>, v1: T, v2: S) => R):
551
+  ((o1: A, ...rest: Array<void>) => (o2: B) => A & B) & ((o1: A, o2: B) => A & B);
552
+  declare function mergeWithKey<T,S,R,A:{[k:string]:T},B:{[k:string]:S}>(fn: (key: $Keys<A&B>, v1: T, v2: S) => R, o1: A, o2: B): A & B;
553
+  declare function mergeWithKey<T,S,R,A:{[k:string]:T},B:{[k:string]:S}>(fn: (key: $Keys<A&B>, v1: T, v2: S) => R, o1: A, ...rest: Array<void>): (o2: B) => A & B;
554
+
555
+  declare function objOf<T>(key: string, ...rest: Array<void>): (val: T) => {[key: string]: T};
556
+  declare function objOf<T>(key: string, val: T): {[key: string]: T};
557
+
558
+  declare function omit<T:Object>(keys: Array<$Keys<T>>, ...rest: Array<void>): (val: T) => Object;
559
+  declare function omit<T:Object>(keys: Array<$Keys<T>>, val: T): Object;
560
+
561
+  // TODO over
562
+
563
+  declare function path<V,A:?NestedObject<V>>(p: Array<string>, ...rest: Array<void>): (o: A) => ?V;
564
+  declare function path<V,A:?NestedObject<V>>(p: Array<string>, o: A): ?V;
565
+
566
+  declare function pathOr<T,V,A:NestedObject<V>>(or: T, ...rest: Array<void>):
567
+  ((p: Array<string>, ...rest: Array<void>) => (o: ?A) => V|T)
568
+  & ((p: Array<string>, o: ?A) => V|T);
569
+  declare function pathOr<T,V,A:NestedObject<V>>(or: T, p: Array<string>, ...rest: Array<void>): (o: ?A) => V|T;
570
+  declare function pathOr<T,V,A:NestedObject<V>>(or: T, p: Array<string>, o: ?A): V|T;
571
+
572
+  declare function pick<A>(keys: Array<string>, ...rest: Array<void>): (val: {[key:string]: A}) => {[key:string]: A};
573
+  declare function pick<A>(keys: Array<string>, val: {[key:string]: A}): {[key:string]: A};
574
+
575
+  declare function pickAll<A>(keys: Array<string>, ...rest: Array<void>): (val: {[key:string]: A}) => {[key:string]: ?A};
576
+  declare function pickAll<A>(keys: Array<string>, val: {[key:string]: A}): {[key:string]: ?A};
577
+
578
+  declare function pickBy<A>(fn: BinaryPredicateFn2<A,string>, ...rest: Array<void>): (val: {[key:string]: A}) => {[key:string]: A};
579
+  declare function pickBy<A>(fn: BinaryPredicateFn2<A,string>, val: {[key:string]: A}): {[key:string]: A};
580
+
581
+  declare function project<T>(keys: Array<string>, ...rest: Array<void>): (val: Array<{[key:string]: T}>) => Array<{[key:string]: T}>;
582
+  declare function project<T>(keys: Array<string>, val: Array<{[key:string]: T}>): Array<{[key:string]: T}>;
583
+
584
+  declare function prop<T,O:{[k:string]:T}>(key: $Keys<O>, ...rest: Array<void>): (o: O) => ?T;
585
+  declare function prop<T,O:{[k:string]:T}>(key: $Keys<O>, o: O): ?T;
586
+
587
+  declare function propOr<T,V,A:{[k:string]:V}>(or: T, ...rest: Array<void>):
588
+  ((p: $Keys<A>, ...rest: Array<void>) => (o: A) => V|T)
589
+  & ((p: $Keys<A>, o: A) => V|T);
590
+  declare function propOr<T,V,A:{[k:string]:V}>(or: T, p: $Keys<A>, ...rest: Array<void>): (o: A) => V|T;
591
+  declare function propOr<T,V,A:{[k:string]:V}>(or: T, p: $Keys<A>, o: A): V|T;
592
+
593
+  declare function keysIn(o: Object): Array<string>;
594
+
595
+  declare function props<T,O:{[k:string]:T}>(keys: Array<$Keys<O>>, ...rest: Array<void>): (o: O) => Array<?T>;
596
+  declare function props<T,O:{[k:string]:T}>(keys: Array<$Keys<O>>, o: O): Array<?T>;
597
+
598
+  // TODO set
599
+
600
+  declare function toPairs<T,O:{[k:string]:T}>(o: O): Array<[$Keys<O>, T]>;
601
+
602
+  declare function toPairsIn<T,O:{[k:string]:T}>(o: O): Array<[string, T]>;
603
+
604
+
605
+  declare function values<T,O:{[k:string]:T}>(o: O): Array<T>;
606
+
607
+  declare function valuesIn<T,O:{[k:string]:T}>(o: O): Array<T|any>;
608
+
609
+  declare function where<T>(predObj: {[key: string]: UnaryPredicateFn<T>}, ...rest: Array<void>): (o: {[k:string]:T}) => boolean;
610
+  declare function where<T>(predObj: {[key: string]: UnaryPredicateFn<T>}, o: {[k:string]:T}): boolean;
611
+
612
+  declare function whereEq<T,S,O:{[k:string]:T},Q:{[k:string]:S}>(predObj: O, ...rest: Array<void>): (o: $Shape<O&Q>) => boolean;
613
+  declare function whereEq<T,S,O:{[k:string]:T},Q:{[k:string]:S}>(predObj: O, o: $Shape<O&Q>): boolean;
614
+
615
+  // TODO view
616
+
617
+  // *Function
618
+  declare var __: *;
619
+
620
+  declare var T: (_: any) => boolean;
621
+  declare var F: (_: any) => boolean;
622
+
623
+  declare function addIndex<A,B>(iterFn:(fn:(x:A) => B, xs: Array<A>) => Array<B>): (fn: (x: A, idx: number, xs: Array<A>) => B, xs: Array<A>) => Array<B>;
624
+
625
+  declare function always<T>(x:T): (x: any) => T;
626
+
627
+  declare function ap<T,V>(fns: Array<(x:T) => V>, ...rest: Array<void>): (xs: Array<T>) => Array<V>;
628
+  declare function ap<T,V>(fns: Array<(x:T) => V>, xs: Array<T>): Array<V>;
629
+
630
+  declare function apply<T,V>(fn: (...args: Array<T>) => V, ...rest: Array<void>): (xs: Array<T>) => V;
631
+  declare function apply<T,V>(fn: (...args: Array<T>) => V, xs: Array<T>): V;
632
+
633
+  declare function applySpec<S,V,T:NestedObject<(...args: Array<V>) => S>>(spec: T): (...args: Array<V>) => NestedObject<S>;
634
+
635
+  declare function binary<T>(fn:(...args: Array<any>) => T): (x: any, y: any) => T;
636
+
637
+  declare function bind<T>(fn: (...args: Array<any>) => any, thisObj: T): (...args: Array<any>) => any;
638
+
639
+  declare function call<T,V>(fn: (...args: Array<V>) => T, ...args: Array<V>): T;
640
+
641
+  declare function comparator<T>(fn: BinaryPredicateFn<T>): (x:T, y:T) => number;
642
+
643
+  // TODO add tests
644
+  declare function construct<T>(ctor: Class<GenericContructor<T>>): (x: T) => GenericContructor<T>;
645
+
646
+  // TODO add tests
647
+  declare function constructN<T>(n: number, ctor: Class<GenericContructorMulti<any>>): (...args: any) => GenericContructorMulti<any>;
648
+
649
+  // TODO make less generic
650
+  declare function converge(after: Function, fns: Array<Function>): Function;
651
+
652
+  declare function empty<T>(x: T): T;
653
+
654
+  declare function flip<A,B,TResult>(fn: (arg0: A, arg1: B) => TResult): CurriedFunction2<B,A,TResult>;
655
+  declare function flip<A,B,C,TResult>(fn: (arg0: A, arg1: B, arg2: C) => TResult): (( arg0: B, arg1: A, ...rest: Array<void>) => (arg2: C) => TResult) & (( arg0: B, arg1: A, arg2: C) => TResult);
656
+  declare function flip<A,B,C,D,TResult>(fn: (arg0: A, arg1: B, arg2: C, arg3: D) => TResult): ((arg1: B, arg0: A, ...rest: Array<void>) => (arg2: C, arg3: D) => TResult) & ((arg1: B, arg0: A, arg2: C, arg3: D) => TResult);
657
+  declare function flip<A,B,C,D,E,TResult>(fn: (arg0: A, arg1: B, arg2: C, arg3: D, arg4:E) => TResult): ((arg1: B, arg0: A, ...rest: Array<void>) => (arg2: C, arg3: D, arg4: E) => TResult) & ((arg1: B, arg0: A, arg2: C, arg3: D, arg4: E) => TResult);
658
+
659
+  declare function identity<T>(x:T): T;
660
+
661
+  declare function invoker<A,B,C,D,O:{[k:string]: Function}>(arity: number, name: $Enum<O>): CurriedFunction2<A,O,D> & CurriedFunction3<A,B,O,D> & CurriedFunction4<A,B,C,O,D>
662
+
663
+  declare function juxt<T,S>(fns: Array<(...args: Array<S>) => T>): (...args: Array<S>) => Array<T>;
664
+
665
+  // TODO lift
666
+
667
+  // TODO liftN
668
+
669
+  declare function memoize<A,B,T:(...args: Array<A>) => B>(fn:T):T;
670
+
671
+  declare function nAry<T>(arity: number, fn:(...args: Array<any>) => T): (...args: Array<any>) => T;
672
+
673
+  declare function nthArg<T>(n: number): (...args: Array<T>) => T;
674
+
675
+  declare function of<T>(x: T): Array<T>;
676
+
677
+  declare function once<A,B,T:(...args: Array<A>) => B>(fn:T):T;
678
+
679
+  // TODO partial
680
+  // TODO partialRight
681
+  // TODO pipeK
682
+  // TODO pipeP
683
+
684
+  declare function tap<T>(fn: (x: T) => any, ...rest: Array<void>): (x: T) => T;
685
+  declare function tap<T>(fn: (x: T) => any, x: T): T;
686
+
687
+  // TODO tryCatch
688
+
689
+  declare function unapply<T,V>(fn: (xs: Array<T>) => V): (...args: Array<T>) => V;
690
+
691
+  declare function unary<T>(fn:(...args: Array<any>) => T): (x: any) => T;
692
+
693
+  declare var uncurryN:
694
+    & (<A, B, C>(2, A => B => C) => (A, B) => C)
695
+    & (<A, B, C, D>(3, A => B => C => D) => (A, B, C) => D)
696
+    & (<A, B, C, D, E>(4, A => B => C => D => E) => (A, B, C, D) => E)
697
+    & (<A, B, C, D, E, F>(5, A => B => C => D => E => F) => (A, B, C, D, E) => F)
698
+    & (<A, B, C, D, E, F, G>(6, A => B => C => D => E => F => G) => (A, B, C, D, E, F) => G)
699
+    & (<A, B, C, D, E, F, G, H>(7, A => B => C => D => E => F => G => H) => (A, B, C, D, E, F, G) => H)
700
+    & (<A, B, C, D, E, F, G, H, I>(8, A => B => C => D => E => F => G => H => I) => (A, B, C, D, E, F, G, H) => I)
701
+
702
+  //TODO useWith
703
+
704
+  declare function wrap<A,B,C,D,F:(...args: Array<A>) => B>(fn: F, fn2: (fn: F, ...args: Array<C>) => D): (...args: Array<A|C>) => D;
705
+
706
+  // *Logic
707
+
708
+  declare function allPass<T>(fns: Array<(...args: Array<T>) => boolean>): (...args: Array<T>) => boolean;
709
+
710
+  declare function and(x: boolean, ...rest: Array<void>): (y: boolean) => boolean;
711
+  declare function and(x: boolean, y: boolean): boolean;
712
+
713
+  declare function anyPass<T>(fns: Array<(...args: Array<T>) => boolean>): (...args: Array<T>) => boolean;
714
+
715
+  declare function both<T>(x: (...args: Array<T>) => boolean, ...rest: Array<void>): (y: (...args: Array<T>) => boolean) => (...args: Array<T>) => boolean;
716
+  declare function both<T>(x: (...args: Array<T>) => boolean, y: (...args: Array<T>) => boolean): (...args: Array<T>) => boolean;
717
+
718
+  declare function complement<T>(x: (...args: Array<T>) => boolean): (...args: Array<T>) => boolean;
719
+
720
+  declare function cond<A,B>(fns: Array<[(...args: Array<A>) => boolean, (...args: Array<A>) => B]>): (...args: Array<A>) => B;
721
+
722
+
723
+  declare function defaultTo<T,V>(d: T, ...rest: Array<void>): (x: ?V) => V|T;
724
+  declare function defaultTo<T,V>(d: T, x: ?V): V|T;
725
+
726
+  declare function either(x: (...args: Array<any>) => boolean, ...rest: Array<void>): (y: (...args: Array<any>) => boolean) => (...args: Array<any>) => boolean;
727
+  declare function either(x: (...args: Array<any>) => boolean, y: (...args: Array<any>) => boolean): (...args: Array<any>) => boolean;
728
+
729
+  declare function ifElse<A,B,C>(cond:(...args: Array<A>) => boolean, ...rest: Array<void>):
730
+  ((f1: (...args: Array<A>) => B, ...rest: Array<void>) => (f2: (...args: Array<A>) => C) => (...args: Array<A>) => B|C)
731
+  & ((f1: (...args: Array<A>) => B, f2: (...args: Array<A>) => C) => (...args: Array<A>) => B|C)
732
+  declare function ifElse<A,B,C>(
733
+    cond:(...args: Array<any>) => boolean,
734
+    f1: (...args: Array<any>) => B,
735
+    f2: (...args: Array<any>) => C
736
+  ): (...args: Array<A>) => B|C;
737
+
738
+  declare function isEmpty(x:?Array<any>|Object|string): boolean;
739
+
740
+  declare function not(x:boolean): boolean;
741
+
742
+  declare function or(x: boolean, y: boolean): boolean;
743
+  declare function or(x: boolean): (y: boolean) => boolean;
744
+
745
+  // TODO: pathSatisfies: Started failing in v39...
746
+  // declare function pathSatisfies<T>(cond: (x: T) => boolean, path: Array<string>, o: NestedObject<T>): boolean;
747
+  // declare function pathSatisfies<T>(cond: (x: T) => boolean, path: Array<string>, ...rest: Array<void>): (o: NestedObject<T>) => boolean;
748
+  // declare function pathSatisfies<T>(cond: (x: T) => boolean, ...rest: Array<void>):
749
+  // ((path: Array<string>, ...rest: Array<void>) => (o: NestedObject<T>) => boolean)
750
+  // & ((path: Array<string>, o: NestedObject<T>) => boolean)
751
+
752
+  declare function propSatisfies<T>(cond: (x: T) => boolean, prop: string, o: NestedObject<T>): boolean;
753
+  declare function propSatisfies<T>(cond: (x: T) => boolean, prop: string, ...rest: Array<void>): (o: NestedObject<T>) => boolean;
754
+  declare function propSatisfies<T>(cond: (x: T) => boolean, ...rest: Array<void>):
755
+  ((prop: string, ...rest: Array<void>) => (o: NestedObject<T>) => boolean)
756
+  & ((prop: string, o: NestedObject<T>) => boolean)
757
+
758
+  declare function unless<T,V,S>(pred: UnaryPredicateFn<T>, ...rest: Array<void>):
759
+  ((fn: (x: S) => V, ...rest: Array<void>) => (x: T|S) => T|V)
760
+  & ((fn: (x: S) => V, x: T|S) => T|V);
761
+  declare function unless<T,V,S>(pred: UnaryPredicateFn<T>, fn: (x: S) => V, ...rest: Array<void>): (x: T|S) => V|T;
762
+  declare function unless<T,V,S>(pred: UnaryPredicateFn<T>, fn: (x: S) => V, x: T|S): T|V;
763
+
764
+  declare function until<T>(pred: UnaryPredicateFn<T>, ...rest: Array<void>):
765
+  ((fn: (x: T) => T, ...rest: Array<void>) => (x: T) => T)
766
+  & ((fn: (x: T) => T, x: T) => T);
767
+  declare function until<T>(pred: UnaryPredicateFn<T>, fn: (x: T) => T, ...rest: Array<void>): (x: T) => T;
768
+  declare function until<T>(pred: UnaryPredicateFn<T>, fn: (x: T) => T, x: T): T;
769
+
770
+  declare function when<T,V,S>(pred: UnaryPredicateFn<T>, ...rest: Array<void>):
771
+  ((fn: (x: S) => V, ...rest: Array<void>) => (x: T|S) => T|V)
772
+  & ((fn: (x: S) => V, x: T|S) => T|V);
773
+  declare function when<T,V,S>(pred: UnaryPredicateFn<T>, fn: (x: S) => V, ...rest: Array<void>): (x: T|S) => V|T;
774
+  declare function when<T,V,S>(pred: UnaryPredicateFn<T>, fn: (x: S) => V, x: T|S): T|V;
775
+}
... ...
@@ -19,9 +19,12 @@
19 19
     "redux": "^3.6.0"
20 20
   },
21 21
   "devDependencies": {
22
+    "babel-cli": "^6.24.1",
23
+    "babel-preset-flow": "^6.23.0",
22 24
     "enzyme": "^2.8.2",
23 25
     "enzyme-to-json": "^1.5.1",
24 26
     "flow": "^0.2.3",
27
+    "flow-bin": "^0.48.0",
25 28
     "flow-typed": "^2.1.2",
26 29
     "react-scripts": "1.0.7",
27 30
     "react-test-renderer": "^15.5.4"
... ...
@@ -30,6 +33,7 @@
30 33
     "start": "react-scripts start",
31 34
     "build": "react-scripts build",
32 35
     "test": "react-scripts test --env=jsdom",
33
-    "eject": "react-scripts eject"
36
+    "eject": "react-scripts eject",
37
+    "flow": "flow"
34 38
   }
35 39
 }
... ...
@@ -311,6 +311,27 @@ axobject-query@^0.1.0:
311 311
   dependencies:
312 312
     ast-types-flow "0.0.7"
313 313
 
314
+babel-cli@^6.24.1:
315
+  version "6.24.1"
316
+  resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.1.tgz#207cd705bba61489b2ea41b5312341cf6aca2283"
317
+  dependencies:
318
+    babel-core "^6.24.1"
319
+    babel-polyfill "^6.23.0"
320
+    babel-register "^6.24.1"
321
+    babel-runtime "^6.22.0"
322
+    commander "^2.8.1"
323
+    convert-source-map "^1.1.0"
324
+    fs-readdir-recursive "^1.0.0"
325
+    glob "^7.0.0"
326
+    lodash "^4.2.0"
327
+    output-file-sync "^1.1.0"
328
+    path-is-absolute "^1.0.0"
329
+    slash "^1.0.0"
330
+    source-map "^0.5.0"
331
+    v8flags "^2.0.10"
332
+  optionalDependencies:
333
+    chokidar "^1.6.1"
334
+
314 335
 babel-code-frame@6.22.0, babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0:
315 336
   version "6.22.0"
316 337
   resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4"
... ...
@@ -814,7 +835,7 @@ babel-plugin-transform-strict-mode@^6.24.1:
814 835
     babel-runtime "^6.22.0"
815 836
     babel-types "^6.24.1"
816 837
 
817
-babel-polyfill@^6.6.1:
838
+babel-polyfill@^6.23.0, babel-polyfill@^6.6.1:
818 839
   version "6.23.0"
819 840
   resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
820 841
   dependencies:
... ...
@@ -1274,7 +1295,7 @@ cheerio@^0.22.0:
1274 1295
     lodash.reject "^4.4.0"
1275 1296
     lodash.some "^4.4.0"
1276 1297
 
1277
-chokidar@^1.4.3, chokidar@^1.6.0:
1298
+chokidar@^1.4.3, chokidar@^1.6.0, chokidar@^1.6.1:
1278 1299
   version "1.7.0"
1279 1300
   resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
1280 1301
   dependencies:
... ...
@@ -1411,7 +1432,7 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
1411 1432
   dependencies:
1412 1433
     delayed-stream "~1.0.0"
1413 1434
 
1414
-commander@2.9.x, commander@~2.9.0:
1435
+commander@2.9.x, commander@^2.8.1, commander@~2.9.0:
1415 1436
   version "2.9.0"
1416 1437
   resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
1417 1438
   dependencies:
... ...
@@ -2542,6 +2563,10 @@ flatten@^1.0.2:
2542 2563
   version "1.0.2"
2543 2564
   resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
2544 2565
 
2566
+flow-bin@^0.48.0:
2567
+  version "0.48.0"
2568
+  resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.48.0.tgz#72d075143524358db8901525e3c784dc13a7c7ee"
2569
+
2545 2570
 flow-typed@^2.1.2:
2546 2571
   version "2.1.2"
2547 2572
   resolved "https://registry.yarnpkg.com/flow-typed/-/flow-typed-2.1.2.tgz#468f7a8b6bc18689856a1d101713b23bb39f01e4"
... ...
@@ -2625,6 +2650,10 @@ fs-extra@^2.0.0:
2625 2650
     graceful-fs "^4.1.2"
2626 2651
     jsonfile "^2.1.0"
2627 2652
 
2653
+fs-readdir-recursive@^1.0.0:
2654
+  version "1.0.0"
2655
+  resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560"
2656
+
2628 2657
 fs.realpath@^1.0.0:
2629 2658
   version "1.0.0"
2630 2659
   resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
... ...
@@ -2776,7 +2805,7 @@ got@^5.0.0:
2776 2805
     unzip-response "^1.0.2"
2777 2806
     url-parse-lax "^1.0.0"
2778 2807
 
2779
-graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
2808
+graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
2780 2809
   version "4.1.11"
2781 2810
   resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
2782 2811
 
... ...
@@ -4074,11 +4103,7 @@ miller-rabin@^4.0.0:
4074 4103
     bn.js "^4.0.0"
4075 4104
     brorand "^1.0.1"
4076 4105
 
4077
-"mime-db@>= 1.27.0 < 2":
4078
-  version "1.28.0"
4079
-  resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.28.0.tgz#fedd349be06d2865b7fc57d837c6de4f17d7ac3c"
4080
-
4081
-mime-db@~1.27.0:
4106
+"mime-db@>= 1.27.0 < 2", mime-db@~1.27.0:
4082 4107
   version "1.27.0"
4083 4108
   resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1"
4084 4109
 
... ...
@@ -4455,6 +4480,14 @@ osenv@^0.1.0, osenv@^0.1.4:
4455 4480
     os-homedir "^1.0.0"
4456 4481
     os-tmpdir "^1.0.0"
4457 4482
 
4483
+output-file-sync@^1.1.0:
4484
+  version "1.1.2"
4485
+  resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76"
4486
+  dependencies:
4487
+    graceful-fs "^4.1.4"
4488
+    mkdirp "^0.5.1"
4489
+    object-assign "^4.1.0"
4490
+
4458 4491
 "over@>= 0.0.5 < 1":
4459 4492
   version "0.0.5"
4460 4493
   resolved "https://registry.yarnpkg.com/over/-/over-0.0.5.tgz#f29852e70fd7e25f360e013a8ec44c82aedb5708"
... ...
@@ -6183,6 +6216,10 @@ url@^0.11.0:
6183 6216
     punycode "1.3.2"
6184 6217
     querystring "0.2.0"
6185 6218
 
6219
+user-home@^1.1.1:
6220
+  version "1.1.1"
6221
+  resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
6222
+
6186 6223
 user-home@^2.0.0:
6187 6224
   version "2.0.0"
6188 6225
   resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f"
... ...
@@ -6219,6 +6256,12 @@ uuid@^3.0.0:
6219 6256
   version "3.0.1"
6220 6257
   resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
6221 6258
 
6259
+v8flags@^2.0.10:
6260
+  version "2.1.1"
6261
+  resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
6262
+  dependencies:
6263
+    user-home "^1.1.1"
6264
+
6222 6265
 validate-npm-package-license@^3.0.1:
6223 6266
   version "3.0.1"
6224 6267
   resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"