import { Reducer } from 'redux' ; export default < S > ( res , initialState ? ) : Reducer < S , any > => ( ( state = initialState as S , action ) => ( res . reduce ( ( curr , re ) => re ( curr , action ) , state ) ) ) ;