export interface Aggregate { isEmpty: (a: A) => boolean size: (a: A) => number }