extra-ilists
Version:
ILists is a pair of key iterable list and value iterable list, with unique keys.
633 lines (626 loc) ⢠24.3 kB
TypeScript
/**
* Entries is a list of key-value pairs, with unique keys.
* [š](https://github.com/nodef/extra-ilists/wiki/Entries)
*/
declare type Entries<K, V> = Iterable<[K, V]>;
/**
* ILists is a pair of key list and value list, with unique keys.
* [š](https://github.com/nodef/extra-ilists/wiki/ILists)
*/
declare type ILists<K, V> = [Iterable<K>, Iterable<V>];
/**
* Handle reading of a single value.
* [š](https://github.com/nodef/extra-ilists/wiki/ReadFunction)
* @returns value
*/
declare type ReadFunction<T> = () => T;
/**
* Handle combining of two values.
* [š](https://github.com/nodef/extra-ilists/wiki/CombineFunction)
* @param a a value
* @param b another value
* @returns combined value
*/
declare type CombineFunction<T> = (a: T, b: T) => T;
/**
* Handle comparison of two values.
* [š](https://github.com/nodef/extra-ilists/wiki/CompareFunction)
* @param a a value
* @param b another value
* @returns a<b: -ve, a=b: 0, a>b: +ve
*/
declare type CompareFunction<T> = (a: T, b: T) => number;
/**
* Handle processing of values in ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/ProcessFunction)
* @param v value in ilists
* @param k key of value in ilists
* @param x ilists containing the value
*/
declare type ProcessFunction<K, V> = (v: V, k: K, x: ILists<K, V>) => void;
/**
* Handle selection of values in ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/TestFunction)
* @param v value in ilists
* @param k key of value in ilists
* @param x ilists containing the value
* @returns selected?
*/
declare type TestFunction<K, V> = (v: V, k: K, x: ILists<K, V>) => boolean;
/**
* Handle transformation of a value to another.
* [š](https://github.com/nodef/extra-ilists/wiki/MapFunction)
* @param v value in ilists
* @param k key of value in ilists
* @param x ilists containing the value
* @returns transformed value
*/
declare type MapFunction<K, V, W> = (v: V, k: K, x: ILists<K, V>) => W;
/**
* Handle reduction of multiple values into a single value.
* [š](https://github.com/nodef/extra-ilists/wiki/ReduceFunction)
* @param acc accumulator (temporary result)
* @param v value in ilists
* @param k key of value in ilists
* @param x ilists containing the value
* @returns reduced value
*/
declare type ReduceFunction<K, V, W> = (acc: W, v: V, k: K, x: ILists<K, V>) => W;
/**
* Handle ending of combined ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/EndFunction)
* @param dones iįµŹ° ilists done?
* @returns combined ilists done?
*/
declare type EndFunction = (dones: boolean[]) => boolean;
/**
* Check if value is ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/is)
* @param v value
* @returns v is ilists?
*/
declare function is<K, V>(v: any): v is ILists<K, V>;
/**
* List all keys.
* [š](https://github.com/nodef/extra-ilists/wiki/keys)
* @param x ilists
* @returns kā, kā, ... | kįµ¢ ā x[0]
*/
declare function keys<K, V>(x: ILists<K, V>): Iterable<K>;
/**
* List all values.
* [š](https://github.com/nodef/extra-ilists/wiki/values)
* @param x ilists
* @returns vā, vā, ... | vįµ¢ ā x[1]
*/
declare function values<K, V>(x: ILists<K, V>): Iterable<V>;
/**
* List all key-value pairs.
* [š](https://github.com/nodef/extra-ilists/wiki/entries)
* @param x ilists
* @returns [kā, vā], [kā, vā], ... | kįµ¢ ā x[0]; vįµ¢ ā x[1]
*/
declare function entries<K, V>(x: ILists<K, V>): Entries<K, V>;
/**
* Convert ilists to entries.
* [š](https://github.com/nodef/extra-ilists/wiki/fromEntries)
* @param x entries
* @returns x as ilists
*/
declare function fromEntries<K, V>(x: Entries<K, V>): ILists<K, V>;
/**
* Find the size of ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/size)
* @param x ilists
* @returns |x|
*/
declare function size<K, V>(x: ILists<K, V>): number;
/**
* Check if ilists is empty.
* [š](https://github.com/nodef/extra-ilists/wiki/isEmpty)
* @param x ilists
* @returns |x| = 0?
*/
declare function isEmpty<K, V>(x: ILists<K, V>): boolean;
/**
* Compare two ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/compare)
* @param x ilists
* @param y another ilists
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns x=y: 0, otherwise: -ve/+ve
*/
declare function compare<K, V, W = V>(x: ILists<K, V>, y: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): number;
/**
* Check if two ilists are equal.
* [š](https://github.com/nodef/extra-ilists/wiki/isEqual)
* @param x ilists
* @param y another ilists
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns x=y?
*/
declare function isEqual<K, V, W = V>(x: ILists<K, V>, y: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): boolean;
/**
* Get value at key.
* [š](https://github.com/nodef/extra-ilists/wiki/get)
* @param x ilists
* @param k key
* @returns x[k]
*/
declare function get<K, V>(x: ILists<K, V>, k: K): V;
/**
* Gets values at keys.
* [š](https://github.com/nodef/extra-ilists/wiki/getAll)
* @param x ilists
* @param ks keys
* @returns x[kā], x[kā], ... | [kā, kā, ...] = ks
*/
declare function getAll<K, V>(x: ILists<K, V>, ks: K[]): Iterable<V>;
/**
* Get value at path in nested ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/getPath)
* @param x nested ilists
* @param p path
* @returns x[kā][kā][...] | [kā, kā, ...] = p
*/
declare function getPath<K>(x: ILists<K, any>, p: K[]): any;
/**
* Check if nested ilists has a path.
* [š](https://github.com/nodef/extra-ilists/wiki/hasPath)
* @param x nested ilists
* @param p search path
* @returns x[kā][kā][...] exists? | [kā, kā, ...] = p
*/
declare function hasPath<T>(x: ILists<T, any>, p: T[]): boolean;
/**
* Set value at key.
* [š](https://github.com/nodef/extra-ilists/wiki/set)
* @param x ilists
* @param k key
* @param v value
* @returns x' | x' = x; x'[k] = v
*/
declare function set<K, V>(x: ILists<K, V>, k: K, v: V): ILists<K, V>;
/**
* Exchange two values.
* [š](https://github.com/nodef/extra-ilists/wiki/swap)
* @param x ilists
* @param k a key
* @param l another key
* @returns x' | x' = x; x'[k] = x[l]; x'[l] = x[k]
*/
declare function swap<K, V>(x: ILists<K, V>, k: K, l: K): ILists<K, V>;
/**
* Remove value at key.
* [š](https://github.com/nodef/extra-ilists/wiki/remove)
* @param x ilists
* @param k key
* @returns x - [k, v] | v = x[k]
*/
declare function remove<K, V>(x: ILists<K, V>, k: K): ILists<K, V>;
/**
* Get first entry from ilists (default order).
* [š](https://github.com/nodef/extra-ilists/wiki/head)
* @param x ilists
* @param ed default entry
* @returns [kā, vā] if x ā Φ else ed | [kā, vā] ā x
*/
declare function head<K, V>(x: ILists<K, V>, ed?: [K, V]): [K, V];
/**
* Get ilists without its first entry (default order).
* [š](https://github.com/nodef/extra-ilists/wiki/tail)
* @param x ilists
* @returns x \\ \{[kā, vā]\} if x ā Φ else x | [kā, vā] ā x
*/
declare function tail<K, V>(x: ILists<K, V>): ILists<K, V>;
/**
* Keep first n entries only (default order).
* [š](https://github.com/nodef/extra-ilists/wiki/take)
* @param x ilists
* @param n number of entries [1]
* @returns \{[kā, vā], [kā, vā], ...\} | [kįµ¢, vįµ¢] ā x and |\{[kā, vā], [kā, vā], ...\}| ⤠n
*/
declare function take<K, V>(x: ILists<K, V>, n?: number): ILists<K, V>;
/**
* Remove first n entries (default order).
* [š](https://github.com/nodef/extra-ilists/wiki/drop)
* @param x a map
* @param n number of entries [1]
* @returns \{[kā, vā], [kāāā, vāāā], ...\} | [kįµ¢, vįµ¢] ā x and |\{[kā, vā], [kāāā, vāāā], ...\}| ⤠max(|x| - n, 0)
*/
declare function drop<K, V>(x: ILists<K, V>, n?: number): ILists<K, V>;
/**
* Count values which satisfy a test.
* [š](https://github.com/nodef/extra-ilists/wiki/count)
* @param x ilists
* @param ft test function (v, k, x)
* @returns Ī£tįµ¢ | tįµ¢ = 1 if ft(vįµ¢) else 0; [kįµ¢, vįµ¢] ā x
*/
declare function count<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): number;
/**
* Count occurrences of values.
* [š](https://github.com/nodef/extra-ilists/wiki/countAs)
* @param x ilists
* @param fm map function (v, k, x)
* @returns Map \{value ā count\}
*/
declare function countAs<K, V, W = V>(x: ILists<K, V>, fm?: MapFunction<K, V, V | W> | null): Map<V | W, number>;
/**
* Find smallest value.
* [š](https://github.com/nodef/extra-ilists/wiki/min)
* @param x ilists
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns v | v ⤠vįµ¢; [kįµ¢, vįµ¢] ā x
*/
declare function min<K, V, W = V>(x: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): V;
/**
* Find smallest entry.
* [š](https://github.com/nodef/extra-ilists/wiki/minEntry)
* @param x ilists
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns [min_key, min_value]
*/
declare function minEntry<K, V, W = V>(x: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): [K, V];
/**
* Find largest value.
* [š](https://github.com/nodef/extra-ilists/wiki/max)
* @param x ilists
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns v | v ā„ vįµ¢; [kįµ¢, vįµ¢] ā x
*/
declare function max<K, V, W = V>(x: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): V;
/**
* Find largest entry.
* [š](https://github.com/nodef/extra-ilists/wiki/maxEntry)
* @param x ilists
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns [max_key, max_value]
*/
declare function maxEntry<K, V, W = V>(x: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): [K, V];
/**
* Find smallest and largest values.
* [š](https://github.com/nodef/extra-ilists/wiki/range)
* @param x ilists
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns [min_value, max_value]
*/
declare function range<K, V, W = V>(x: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): [V, V];
/**
* Find smallest and largest entries.
* [š](https://github.com/nodef/extra-ilists/wiki/rangeEntries)
* @param x ilists
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns [min_entry, max_entry]
*/
declare function rangeEntries<K, V, W = V>(x: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): [[K, V], [K, V]];
/**
* List all possible subsets.
* [š](https://github.com/nodef/extra-ilists/wiki/subsets)
* @param x ilists
* @param n number of entries in each subset [-1 ā any]
* @returns entries selected by bit from 0..2^|x| if n<0; only of length n otherwise
*/
declare function subsets<K, V>(x: ILists<K, V>, n?: number): Iterable<ILists<K, V>>;
/**
* Pick an arbitrary key.
* [š](https://github.com/nodef/extra-ilists/wiki/randomKey)
* @param x ilists
* @param fr random number generator ([0, 1))
* @returns kįµ¢ | kįµ¢ ā x[0]
*/
declare function randomKey<K, V>(x: ILists<K, V>, fr?: ReadFunction<number>): K;
/**
* Pick an arbitrary value.
* [š](https://github.com/nodef/extra-ilists/wiki/randomValue)
* @param x ilists
* @param fr random number generator ([0, 1))
* @returns vįµ¢ | vįµ¢ ā x[1]
*/
declare function randomValue<K, V>(x: ILists<K, V>, fr?: ReadFunction<number>): V;
/**
* Pick an arbitrary entry.
* [š](https://github.com/nodef/extra-ilists/wiki/randomEntry)
* @param x ilists
* @param fr random number generator ([0, 1))
* @returns [kįµ¢, vįµ¢] | kįµ¢ ā x[0]; vįµ¢ ā x[1]
*/
declare function randomEntry<K, V>(x: ILists<K, V>, fr?: ReadFunction<number>): [K, V];
/**
* Pick an arbitrary subset.
* [š](https://github.com/nodef/extra-ilists/wiki/randomSubset)
* @param x ilists
* @param n number of entries [-1 ā any]
* @param fr random number generator ([0, 1))
* @returns [[kįµ¢, kā±¼, ...], [vįµ¢, vā±¼, ...]] | kįµ¢, kā±¼, ... ā x[0]; vįµ¢, vā±¼, ... ā x[1]; |[kįµ¢, kā±¼, , ...]| = |x| if n<0 else n
*/
declare function randomSubset<K, V>(x: ILists<K, V>, n?: number, fr?: ReadFunction<number>): ILists<K, V>;
/**
* Check if ilists has a key.
* [š](https://github.com/nodef/extra-ilists/wiki/has)
* @param x ilists
* @param k search key
* @returns k ā keys(x)?
*/
declare function has<K, V>(x: ILists<K, V>, k: K): boolean;
/**
* Check if ilists has a value.
* [š](https://github.com/nodef/extra-ilists/wiki/hasValue)
* @param x ilists
* @param v search value
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns v ā values(x)?
*/
declare function hasValue<K, V, W = V>(x: ILists<K, V>, v: V, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): boolean;
/**
* Check if ilists has an entry.
* [š](https://github.com/nodef/extra-ilists/wiki/hasEntry)
* @param x ilists
* @param e search entry
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns k ā x[0]; v ā x[1]; k ā v? | [k, v] = e
*/
declare function hasEntry<K, V, W = V>(x: ILists<K, V>, e: [K, V], fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): boolean;
/**
* Check if ilists has a subset.
* [š](https://github.com/nodef/extra-ilists/wiki/hasSubset)
* @param x ilists
* @param y search subset
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns y ā x?
*/
declare function hasSubset<K, V, W = V>(x: ILists<K, V>, y: ILists<K, V>, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): boolean;
/**
* Find first value passing a test (default order).
* [š](https://github.com/nodef/extra-ilists/wiki/find)
* @param x ilists
* @param ft test function (v, k, x)
* @returns first v | ft(v) = true; [k, v] ā x
*/
declare function find<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): V;
/**
* Find values passing a test.
* [š](https://github.com/nodef/extra-ilists/wiki/findAll)
* @param x ilists
* @param ft test function (v, k, x)
* @returns vā, vā, ... | ft(vįµ¢) = true; [kįµ¢, vįµ¢] ā x
*/
declare function findAll<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): Iterable<V>;
/**
* Finds key of an entry passing a test.
* [š](https://github.com/nodef/extra-ilists/wiki/search)
* @param x ilists
* @param ft test function (v, k, x)
* @returns key of entry
*/
declare function search<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): K;
/**
* Find keys of entries passing a test.
* [š](https://github.com/nodef/extra-ilists/wiki/searchAll)
* @param x ilists
* @param ft test function (v, k, x)
* @returns keys of entries
*/
declare function searchAll<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): Iterable<K>;
/**
* Find a key with given value.
* [š](https://github.com/nodef/extra-ilists/wiki/searchValue)
* @param x ilists
* @param v search value
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns key of value
*/
declare function searchValue<K, V, W = V>(x: ILists<K, V>, v: V, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): K;
/**
* Find keys with given value.
* [š](https://github.com/nodef/extra-ilists/wiki/searchValueAll)
* @param x ilists
* @param v search value
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
* @returns keys of value
*/
declare function searchValueAll<K, V, W = V>(x: ILists<K, V>, v: V, fc?: CompareFunction<V | W> | null, fm?: MapFunction<K, V, V | W> | null): Iterable<K>;
/**
* Call a function for each value.
* [š](https://github.com/nodef/extra-ilists/wiki/forEach)
* @param x ilists
* @param fp process function (v, k, x)
*/
declare function forEach<K, V>(x: ILists<K, V>, fc: ProcessFunction<K, V>): void;
/**
* Check if any value satisfies a test.
* [š](https://github.com/nodef/extra-ilists/wiki/some)
* @param x ilists
* @param ft test function (v, k, x)
* @returns true if ft(vįµ¢) = true for some [kįµ¢, vįµ¢] ā x
*/
declare function some<K, V>(x: ILists<K, V>, ft?: TestFunction<K, V> | null): boolean;
/**
* Check if all values satisfy a test.
* [š](https://github.com/nodef/extra-ilists/wiki/every)
* @param x entries
* @param ft test function (v, k, x)
* @returns true if ft(vįµ¢) = true for every [kįµ¢, vįµ¢] ā x
*/
declare function every<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): boolean;
/**
* Transform values of entries.
* [š](https://github.com/nodef/extra-ilists/wiki/map)
* @param x ilists
* @param fm map function (v, k, x)
* @returns [kā, fm(vā)], [kā, fm(vā)], ... | [kįµ¢, vįµ¢] ā x
*/
declare function map<K, V, W>(x: ILists<K, V>, fm: MapFunction<K, V, W>): any[][];
/**
* Reduce values of entries to a single value.
* [š](https://github.com/nodef/extra-ilists/wiki/reduce)
* @param x ilists
* @param fr reduce function (acc, v, k, x)
* @param acc initial value
* @returns fr(fr(acc, vā), vā)... | fr(acc, vā) = vā if acc not given
*/
declare function reduce<K, V, W = V>(x: ILists<K, V>, fr: ReduceFunction<K, V, V | W>, acc?: V | W): V | W;
/**
* Keep entries which pass a test.
* [š](https://github.com/nodef/extra-ilists/wiki/filter)
* @param x ilists
* @param ft test function (v, k, x)
* @returns [kā, vā], [kā, vā], ... | ft(vįµ¢) = true; [kįµ¢, vįµ¢] ā x
*/
declare function filter<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): ILists<K, V>;
/**
* Keep entries with given keys.
* [š](https://github.com/nodef/extra-ilists/wiki/filterAt)
* @param x ilists
* @param ks keys
* @returns [kā, vā], [kā, vā], ... | kįµ¢ ā ks; [kįµ¢, vįµ¢] ā x
*/
declare function filterAt<K, V>(x: ILists<K, V>, ks: K[]): ILists<K, V>;
/**
* Discard entries which pass a test.
* [š](https://github.com/nodef/extra-ilists/wiki/reject)
* @param x ilists
* @param ft test function (v, k, x)
* @returns [kā, vā], [kā, vā], ... | ft(vįµ¢) = false; [kįµ¢, vįµ¢] ā x
*/
declare function reject<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): ILists<K, V>;
/**
* Discard entries with given keys.
* [š](https://github.com/nodef/extra-ilists/wiki/rejectAt)
* @param x ilists
* @param ks keys
* @returns [kā, vā], [kā, vā], ... | kįµ¢ ā ks; [kįµ¢, vįµ¢] ā x
*/
declare function rejectAt<K, V>(x: ILists<K, V>, ks: K[]): ILists<K, V>;
/**
* Flatten nested ilists to given depth.
* [š](https://github.com/nodef/extra-ilists/wiki/flat)
* @param x nested ilists
* @param n maximum depth [-1 ā all]
* @param fm map function (v, k, x)
* @param ft test function for flatten (v, k, x) [is]
* @returns flat ilists
*/
declare function flat<K>(x: ILists<K, any>, n?: number, fm?: MapFunction<K, any, any> | null, ft?: TestFunction<K, any> | null): ILists<K, any>;
/**
* Flatten nested ilists, based on map function.
* [š](https://github.com/nodef/extra-ilists/wiki/flatMap)
* @param x nested ilists
* @param fm map function (v, k, x)
* @param ft test function for flatten (v, k, x) [is]
* @returns flat ilists
*/
declare function flatMap<K>(x: ILists<K, any>, fm?: MapFunction<K, any, any> | null, ft?: TestFunction<K, any> | null): ILists<K, any>;
/**
* Combine matching entries from all ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/zip)
* @param xs all ilists
* @param fm map function (vs, k)
* @param ft end function (dones) [some]
* @param vd default value
* @returns fm([xā[kā], xā[kā], ...]), fm([xā[kā], xā[kā], ...]), ...
*/
declare function zip<K, V, W = V>(xs: ILists<K, V>[], fm?: MapFunction<K, V[], V[] | W> | null, ft?: EndFunction, vd?: V): ILists<K, V[] | W>;
/**
* Segregate values by test result.
* [š](https://github.com/nodef/extra-ilists/wiki/partition)
* @param x ilists
* @param ft test function (v, k, x)
* @returns [satisfies, doesnt]
*/
declare function partition<K, V>(x: ILists<K, V>, ft: TestFunction<K, V>): [ILists<K, V>, ILists<K, V>];
/**
* Segregate entries by similarity.
* [š](https://github.com/nodef/extra-ilists/wiki/partitionAs)
* @param x entries
* @param fm map function (v, k, x)
* @returns Map \{key ā entries\}
*/
declare function partitionAs<K, V, W = V>(x: ILists<K, V>, fm?: MapFunction<K, V, V | W> | null): Map<V | W, ILists<K, V>>;
/**
* Break ilists into chunks of given size.
* [š](https://github.com/nodef/extra-ilists/wiki/chunk)
* @param x ilists
* @param n chunk size [1]
* @param s chunk step [n]
* @returns [x[0..n], x[s..s+n], x[2s..2s+n], ...]
*/
declare function chunk<K, V>(x: ILists<K, V>, n?: number, s?: number): ILists<K, V>[];
/**
* Append entries from all ilists, preferring last.
* [š](https://github.com/nodef/extra-ilists/wiki/concat)
* @param xs all ilists
* @returns xā āŖ xā āŖ ... | [xā, xā, ...] = xs
*/
declare function concat<K, V>(...xs: ILists<K, V>[]): ILists<K, V>;
/**
* Join ilists together into a string.
* [š](https://github.com/nodef/extra-ilists/wiki/join)
* @param x ilists
* @param sep separator [,]
* @param asc associator [=]
* @returns "$\{kā\}=$\{vā\},$\{kā\}=$\{vā\}..." | [kįµ¢, vįµ¢] ā x
*/
declare function join<K, V>(x: ILists<K, V>, sep?: string, asc?: string): string;
/**
* Check if ilists have no common keys.
* [š](https://github.com/nodef/extra-ilists/wiki/isDisjoint)
* @param x ilists
* @param y another ilists
* @returns x ⩠y = Φ?
*/
declare function isDisjoint<K, V>(x: ILists<K, V>, y: ILists<K, V>): boolean;
/**
* Obtain keys present in any ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/unionKeys)
* @param xs all ilists
* @returns \{kā, kā, ...\} | [kįµ¢, vįµ¢] ā xā āŖ xā, ...; [xā, xā, ...] = xs
*/
declare function unionKeys<K, V>(...xs: ILists<K, V>[]): Set<K>;
/**
* Obtain entries present in any ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/union)
* @param x ilists
* @param y another ilists
* @param fc combine function (a, b)
* @returns x āŖ y = \{[kįµ¢, vįµ¢] | [kįµ¢, vįµ¢] ā x or [kįµ¢, vįµ¢] ā y\}
*/
declare function union<K, V>(x: ILists<K, V>, y: ILists<K, V>, fc?: CombineFunction<V> | null): ILists<K, V>;
/**
* Obtain entries present in both ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/intersection)
* @param x ilists
* @param y another ilists
* @param fc combine function (a, b)
* @returns x ā© y = \{[kįµ¢, vįµ¢] | [kįµ¢, vįµ¢] ā x and [kįµ¢, vįµ¢] ā y\}
*/
declare function intersection<K, V>(x: ILists<K, V>, y: ILists<K, V>, fc?: CombineFunction<V> | null): ILists<K, V>;
/**
* Obtain entries not present in another ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/difference)
* @param x ilists
* @param y another ilists
* @returns x = x - y = \{[kįµ¢, vįµ¢] | [kįµ¢, vįµ¢] ā x, [kįµ¢, *] ā y\}
*/
declare function difference<K, V>(x: ILists<K, V>, y: ILists<K, V>): ILists<K, V>;
/**
* Obtain entries not present in both ilists.
* [š](https://github.com/nodef/extra-ilists/wiki/symmetricDifference)
* @param x ilists
* @param y another ilists
* @returns x = x-y āŖ y-x
*/
declare function symmetricDifference<K, V>(x: ILists<K, V>, y: ILists<K, V>): ILists<K, V>;
export { CombineFunction, CompareFunction, EndFunction, Entries, ILists, MapFunction, ProcessFunction, ReadFunction, ReduceFunction, TestFunction, chunk, compare, concat, count, countAs, difference, drop, entries, randomEntry as entry, every, filter, filterAt, find, findAll, flat, flatMap, forEach, fromEntries, get, getAll, getPath, has, hasEntry, hasPath, hasSubset, hasValue, head, intersection, is, isDisjoint, isEmpty, isEqual, join, randomKey as key, keys, size as length, map, max, maxEntry, min, minEntry, partition, partitionAs, randomEntry, randomKey, randomSubset, randomValue, range, rangeEntries, reduce, reject, rejectAt, remove, search, searchAll, searchValue, searchValueAll, set, size, some, randomSubset as subset, subsets, swap, symmetricDifference, tail, take, union, unionKeys, randomValue as value, values, zip };