simpleDiffArray = (a, b, compare = _function.equalityStrict) => {
  let left = 0; // number of same characters counting from left

  let right = 0; // number of same characters counting from right

  while (left < a.length && left < b.length && compare(a[left], b[left])) {
    left++;
  }

  if (left !== a.length || left !== b.length) {
    // Only check right if a !== b
    while (right + left < a.length && right + left < b.length && compare(a[a.length - right - 1], b[b.length - right - 1])) {
      right++;
    }
  }

  return {
    index: left,
    remove: a.length - left - right,
    insert: b.slice(left, b.length - right)
  };
}
Create a diff between two arrays. This diff implementation is highly
efficient, but not very sophisticated.

Note: This is basically the same function as above. Another function was created so that the runtime
can better optimize these function calls.

@function
@template T

@param {Array<T>} a The old version of the array
@param {Array<T>} b The updated version of the array
@param {function(T, T):boolean} [compare]
@return {SimpleDiff<Array<T>>} The diff description.