<commit_before>import { Record } from 'immutable';
import { actionTypes } from 'constants';

const AppState = {};

function appReducer(state = AppState, action) {
    const cases = {
        default: () => state,
    };

    return (cases[action] || cases.default)();
}

export default appReducer;<commit_msg>Fix Issue #12: Add `action.type` and `action.payload` to example reducer. Also use an Immutable `Record` for appState<commit_after>import { Record } from 'immutable';
import { actionTypes } from 'constants';

const appState = new Record();

function appReducer(state = appState, action) {
    const cases = {
        default: () => state,
    };

    return (cases[action.type] || cases.default)(action.payload);
}

export default appReducer;
{'fraction_non_alphanumeric': 0.13448735019973368, 'fraction_numerical': 0.002663115845539281, 'mean_word_length': 4.046979865771812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '766942', 'n_tokens_mistral': 227, 'n_tokens_neox': 222, 'n_words': 65}