reduce example