Lambda the Ultimate

inactiveTopic Prolog Tutorial
started 12/16/2000; 11:01:46 AM - last post 12/16/2000; 11:01:46 AM
andrew cooke - Prolog Tutorial  blueArrow
12/16/2000; 11:01:46 AM (reads: 1700, responses: 0)
Prolog Tutorial
Having finished the introduction to Prolog I posted earlier, I though I had a neat way of permuting lists. I was wrong (it had an infinite loop), but it was worth it to find this tutorial which included:

perm([X|Y],Z) :- perm(Y,W), takeout(X,Z,W).   
perm([],[]).

which is pretty neat, even if it only works one way (more details here).

Anyone have a better implementation (apart from the built-in)?

PS It contains much more than that - even some quite involved NLP stuff.
Posted to Logic/Declerative by andrew cooke on 12/16/00; 11:07:17 AM