LOGIC PROGRAMMING WITHIN A FUNCTIONAL FRAMEWORK