old_contents: import {List, Map} from 'immutable';
  
  export function setEntries(state, entries) {
    return state.set('entries', List(entries));
  }
  
  export function next(state) {
    const entries = state.get('entries');
    return state.merge({
      vote: Map({pair: entries.take(2)}),
      entries: entries.skip(2)
    });
  }
  
  export function vote(state, entry) {
    return state.updateIn(
      ['vote', 'tally', entry],
      0,
      tally => tally + 1
    );
  }
  
new_contents: import {List, Map} from 'immutable';
  
  export function setEntries(state, entries) {
    return state.set('entries', List(entries));
  }
  
  export function next(state) {
    const entries = state.get('entries').concat(getWinners(state.get('vote')));
    return state.merge({
      vote: Map({pair: entries.take(2)}),
      entries: entries.skip(2)
    });
  }
  
  export function vote(state, entry) {
    return state.updateIn(
      ['vote', 'tally', entry],
      0,
      tally => tally + 1
    );
  }
  
  // PRIVATE FUNCTION
  // should only be called within next() function
  function getWinners(vote) {
    if (!vote) return [];
    const [a, b] = vote.get('pair');
    const aVotes = vote.getIn(['tally' a], 0);
    const bVotes = vote.getIn(['tally' b], 0);
    if (aVotes > bVotes) {
      return [a];
    } else if (aVotes < bVotes) {
      return [b];
    } else {
      // Handles tied vote condition
      return [a, b];
    }
  }
  
subject: Add 'getWinners()' functin