combinations of variable length nested lists

Mark Robinson m.1.robinson at herts.ac.uk
Tue Aug 7 13:21:40 EDT 2001


Joseph A. Knapka wrote:

> PEP proposal: add a backtracking Horn-clause resolution
> engine to Python!
> 
>  :-)
> 
> This problem is a two-liner in Prolog:
> 
> one_of_each([],[]).
> one_of_each([H|T],[H1|Ts]) :- member(H1,H), one_of_each(T,Ts).
> 
> It could be quite useful to be able to transparently call
> Prolog (or Mercury) from Python. Has anybody done it?
> How about Haskell, ML, etc?
> 
> -- Joe
> 

backtracking Horn-clause resolution engine, that can't be real 
terminology, I am sure you just plagerised Elmer Fudge :)





More information about the Python-list mailing list