When a function parameter itself is a function, TypeScript can infer the parameter types of the passed-in callback from the target signature. That means callers don’t need to annotate arrow parameters explicitly.
You’ll write a small helper that applies a discount calculation.
applyDiscount(price: number, calculate: (p: number) => number): number.calculate(price).applyDiscount(100, p => p * 0.9) // 90
applyDiscount(50, p => p - 5) // 45