export function compose<T extends any[], U, V>(
  f: (x: U) => V,
  g: (...y: T) => U
): {
  <P extends T>(...p: P): V;