higher order functions as return types or parameters