Working through issues with first-class functions