code: function setChecked(newArr, oldArr) {
        if (checklistBeforeChange && (checklistBeforeChange(scope) === false)) {
          setValueInChecklistModel(getChecklistValue(), ngModelGetter(scope));
          return;
        }
        ngModelGetter.assign(scope, contains(newArr, getChecklistValue(), comparator));
      }
docs: declare one function to be used for both $watch functions