function addCollectionElement(state, action) {
	if (action.operations.add) {
		return action.operations.add.reduce((s, e) => {
			const element = s.getIn(action.collectionId);
			if (List.isList(element)) {
				return s.setIn(action.collectionId, element.push(e));
			}
			if (Map.isMap(element)) {
				return s.setIn(action.collectionId, element.merge(e));
			}
			return state;
		}, state);
	}
	return state;
}
/**
 * addElementToCollection
 *
 * @param state current redux state
 * @param action redux action
 * @returns {object} the new state
 */
addElementToCollection
@param state current redux state
@param action redux action
@returns {object} the new state
addElementToCollection @param state current redux state @param action redux action @returns { object } the new state
function addCollectionElement(state, action) {
	if (action.operations.add) {
		return action.operations.add.reduce((s, e) => {
			const element = s.getIn(action.collectionId);
			if (List.isList(element)) {
				return s.setIn(action.collectionId, element.push(e));
			}
			if (Map.isMap(element)) {
				return s.setIn(action.collectionId, element.merge(e));
			}
			return state;
		}, state);
	}
	return state;
}
function addCollectionElement ( state , action ) { if ( action . operations . add ) { return action . operations . add . reduce ( ( s , e ) => { const element = s . getIn ( action . collectionId ) ; if ( List . isList ( element ) ) { return s . setIn ( action . collectionId , element . push ( e ) ) ; } if ( Map . isMap ( element ) ) { return s . setIn ( action . collectionId , element . merge ( e ) ) ; } return state ; } , state ) ; } return state ; }
addElementToCollection
 @param state current redux state
 @param action redux action
 @returns {object} the new state
addElementToCollection @param state current redux state @param action redux action @returns { object } the new state