// @flow
// array.js
declare export function cons(val: A, arr: Array): Array
declare export function append(val: A, arr: Array): Array
declare export function drop(val: number, arr: Array): Array
declare export function tail(arr: Array): Array
declare export function copy(arr: Array): Array
declare export function map(f: (val: A) => B, arr: Array): Array
declare export function reduce(f: (acc: A, val: B) => A, seed: A, arr: Array): A
declare export function replace(toReplace: A, i: number, arr: Array): Array
declare export function remove(i: number, arr: Array): Array
declare export function removeAll(f: (val: A) => boolean, arr: Array): Array
declare export function findIndex(item: A, arr: Array): number
declare export function isArrayLike(x: any): boolean
// function.js
declare export function id(A): A
declare export function compose(f: (B) => C, g: (A) => B): (A) => C
declare export function apply(f: (A) => B, A): B
interface CurriedFunction2 {
(): CurriedFunction2,
(A): (B) => C,
(A, B): C
}
interface CurriedFunction3 {
(): CurriedFunction3,
(A): CurriedFunction2,
(A, B): (C) => D,
(A, B, C): D
}
interface CurriedFunction4 {
(): CurriedFunction4,
(A): CurriedFunction3,
(A, B): CurriedFunction2,
(A, B, C): (D) => E,
(A, B, C, D): E
}
declare export function curry2(f: (A, B) => C): CurriedFunction2
declare export function curry3(f: (A, B, C) => D): CurriedFunction3
declare export function curry4(f: (A, B, C, D) => E): CurriedFunction4