A higher-order function takes a function as an argument or returns one. The apply function from the previous unit is an example:
add := func(a, b int) int { return a + b }
mul := func(a, b int) int { return a * b }
fmt.Println(apply(3, 4, add)) // 7
fmt.Println(apply(3, 4, mul)) // 12
You pass different operations to get different behavior. This pattern lets you write flexible, reusable code.