Higher-order function.
Signed-off-by: Michael <Michael@Mchael.zeng.com>