src/stemmers/french/carry.js
function applyRules(rules, stem) {

  for (let i = 0, l = rules.length; i < l; i++) {
    const [min, pattern, replacement = ''] = rules[i];

    if (stem.slice(-pattern.length) === pattern) {
      const newStem = stem.slice(0, -pattern.length) + replacement,
            m = computeM(newStem);

      if (m <= min)
        continue;

      return newStem;
    }
  }

  return stem;
}
function applyRules(rules, stem) {

  for (let i = 0, l = rules.length; i < l; i++) {
    const [min, pattern, replacement = ''] = rules[i];

    if (stem.slice(-pattern.length) === pattern) {
      const newStem = stem.slice(0, -pattern.length) + replacement,
            m = computeM(newStem);

      if (m <= min)
        continue;

      return newStem;
    }
  }

  return stem;
}
function applyRules ( rules , stem ) { for ( let i = 0 , l = rules . length ; i < l ; i ++ ) { const [ min , pattern , replacement = '' ] = rules [ i ] ; if ( stem . slice ( - pattern . length ) === pattern ) { const newStem = stem . slice ( 0 , - pattern . length ) + replacement , m = computeM ( newStem ) ; if ( m <= min ) continue ; return newStem ; } } return stem ; }
Function used to apply a set of rules to the current stem.

@param  {string} stem - Target stem.
@return {string}      - The resulting stem.
Function used to apply a set of rules to the current stem .