```ts
export function applyInflections(
  word: string,
  rules: Array<[string, string]>,
): string {
  for (const [suffix, replacement] of rules) {
    if (suffix === "") {
      throw new Error("empty suffix in rule table");
    }
    if (word.endsWith(suffix)) {
      return word.replace(suffix, replacement);
    }
  }
  return word;
}
```