import { ArityOneFn , Pipe , WrappingFn } from './internal/common-types' ; type Chain = ( wrappingFn : WrappingFn ) => Pipe ; const chain = ( wrappingFn ) => ( ... fns ) => ( initialArg ) => fns . reduce ( ( arg , fn , index ) => wrappingFn ( fn , arg , index === fns . length - 1 ) , initialArg ) ; export { chain } ; export default chain ;