Functional and Logic Programming