next up previous contents
Next: Compound Terms and Up: Prolog Syntax Previous: Compound Terms

(Compound) Terms as Trees

Take the compound term

 
sentence(np(noun(fred)),vp(verb(swims)))

and construct a tree. Start by marking the root of the tree with the principal functor and draw as many arcs as the principle functor has arguments. For each of the arguments, repeat the above procedure.



Paul Brna
Mon May 24 20:14:48 BST 1999