Generic concatenate lists with monoids