export interface GenericFunction {
(a: A): B;
}
export interface Hash {
[key: string]: A;
}
export interface ObjectReducer {
(accum?: B, value?: A, key?: string, hash?: Hash): B;
}
export interface ObjectMapper {
(value?: A, key?: string, hash?: Hash): B;
}
/**
* identity is the famed identity function.
*/
export declare const identity: (a: A) => A;
export interface O {
[key: string]: A;
}
/**
* merge two objects easily
*/
export declare const merge: (...o: A[]) => B;
/**
* fuse is the deep version of merge
*/
export declare const fuse: (...args: A[]) => B;
export declare const copy: (o: A) => B;
/**
* reduce an object's keys (in no guaranteed order)
*/
export declare const reduce: (o: Hash, f: ObjectReducer, accum?: B) => B;
/**
* map over an object (in no guaranteed oreder)
*/
export declare const map: (o: Hash, f: ObjectMapper) => B[];
/**
* compose two functions into one.
*/
export declare const compose: (f: (a: B) => C, g: (a: A) => B) => (x: A) => C;
/**
* fling removes a key from an object
* @param {string} key
* @param {object} object
* @return {Object}
* @summary {(string,Object) → Object}
*/
export declare const fling: (s: string, o: Hash) => {};
/**
* head returns the item at index 0 of an array
* @param {Array} list
* @return {*}
* @summary { Array → * }
*/
export declare const head: (list: A[]) => A;
/**
* tail returns the last item in an array
* @param {Array} list
* @return {*}
* @summary {Array → *}
*/
export declare const tail: (list: A[]) => A;
/**
* constant given a value, return a function that always returns this value.
* @summary constant X → * → X
*
*/
export declare const constant: (a: A) => (_: any) => A;
/**
* except copies an object removing a single key.
*/
export declare const except: , V>(keys: string[], o: O) => O;