composeRight

串联函数

import composeRight from "ynw/pattern/composeRight";

Source

const composeRight = (...fns) =>
  fns.reduce(
    (f, g) =>
      (...args) =>
        g(f(...args))
  );

export default composeRight;