export function prefixes<T>(x: T[], n: number=-1): T[][] {
  return [...iprefixes(x, n)];
}