Retractions: A Functional Paradigm for Logic Programming