import { Filter } from '../../../../common' ; const noop = ( ) => { throw new Error ( 'No mappings have been found for filter.' ) ; } ; export const generateMappingChain = ( fn , next = noop ) => { return ( filter ) => { try { return fn ( filter ) ; } catch ( result ) { if ( result === filter ) { return next ( filter ) ; } throw result ; } } ; } ;