export interface Hash { readonly hash: (a: A) => number } export function Hash(hash: (a: A) => number): Hash { return { hash } }