ByteDance Interview Question

Complete a higher order functions component