export const SIZE = 5 export const BUCKET_SIZE = Math.pow(2, SIZE) // 32 export const MASK = BUCKET_SIZE - 1 export const OVERFLOW_LEVEL = Math.ceil(32 / SIZE) export type Option = T | undefined; export interface Dict { [key: string]: T } export interface Predicate { (value: T, key: K): boolean } export interface Transform { (value: T, key: K): G } export interface Reducer { (acc: any, value: T, key: K): G } export interface Updater { (value: T): T } export interface Merger { (prev: T, next: T, key: K): T }