abcMultiply = (a, b) => {
  const table = {
    a: {a: 'a', b: 'b', c: 'c'},
    b: {a: 'b', b: 'c', c: 'a'},
    c: {a: 'c', b: 'a', c: 'b'}
  };
  assert(table[a] && table[b]);
  return table[a][b];
}
This operation is isomorphic to addition in Z/3.

  | a | b | c |
---------------
a | a | b | c |
b | b | c | a |
c | c | a | b |
---------------