function solveUpdate(affectedPaths, comparedPaths) {
  var i, j, k, l, m, n, p, c, s; // Looping through possible paths

  for (i = 0, l = affectedPaths.length; i < l; i++) {
    p = affectedPaths[i];
    if (!p.length) return true; // Looping through logged paths

    for (j = 0, m = comparedPaths.length; j < m; j++) {
      c = comparedPaths[j];
      if (!c || !c.length) return true; // Looping through steps

      for (k = 0, n = c.length; k < n; k++) {
        s = c[k]; // If path is not relevant, we break
        // NOTE: the '!=' instead of '!==' is required here!

        if (s != p[k]) break; // If we reached last item and we are relevant

        if (k + 1 === n || k + 1 === p.length) return true;
      }
    }
  }

  return false;
}
Function determining whether some paths in the tree were affected by some
updates that occurred at the given paths. This helper is mainly used at
cursor level to determine whether the cursor is concerned by the updates
fired at tree level.

NOTES: 1) If performance become an issue, the following threefold loop
          can be simplified to a complex twofold one.
       2) A regex version could also work but I am not confident it would
          be faster.
       3) Another solution would be to keep a register of cursors like with
          the monkeys and update along this tree.

@param  {array} affectedPaths - The paths that were updated.
@param  {array} comparedPaths - The paths that we are actually interested in.
@return {boolean}             - Is the update relevant to the compared
                                paths?