Translate global functions to const variables with function literals.