There are several proposals for extending Prolog with functional capabilities. The basic idea is to enlarge the language with function definitions that are translated (or expanded) into Prolog predicates, analogously to what is done for Definite Clause Grammars (DCG’s). It is easy to perform such a translation for a basic functional extension, but it requires an additional effort to incorporate...