type AnyFunction = ( ... args : any [ ] ) => any ; export param { AnyFunction [ ] } fns param { any [ ] } args returns { void } export function executeOnFns < Payload extends any > ( fns , payload , otherArgs ) { for ( const fn of fns ) { payload = fn ( payload , ... otherArgs ) ; } return payload ; }