factorize code dealing with chains of reducers
mapping using a simple function