export function compose<T, U, V, X, Y extends any[]>(
  f: (x: U) => V,
  g: (y: T) => U,
  h: (z: X) => T,
  i: (...a: Y) => X