```ts
export function hourRate(rate: number): number {
  return rate;
}

/** Pay for a week, with overtime beyond forty hours. */
export function weekPay(hours: number, rate: number): number {
  if (hours > 40) {
    const regularHours = 40;
    const overtimeHours = hours - regularHours;
    const regularPay = regularHours * hourRate(rate);
    const overtimePay = overtimeHours * (hourRate(rate) * 1.5);
    return Math.floor(regularPay + overtimePay);
  }
  return hours * hourRate(rate);
}
```