On the Integration of Logic Programming and Functional Programming