Using core.reducers to perform the fold