Higher order funtions.