Next: About this document
Up: No Title
Previous: List Membership
- Possible to represent lists like other Prolog structures
using a special functor '.' (dot).
- .(Head, Tail)
- For instance, a list like :
can be expressed as :
.(miles, .(evans, .(holliday, .(parker, .(getz,[])))))
The dot notation for internal representation
List = [ a, b, c, d \| Tail ]
then extend Tail to
Tail = [ e | Tail1 ]
List = [a, b,c,d,e \| Tail1]
Hence, arbitary extension of lists.
Omer F Rana
Mon Feb 3 13:14:13 GMT 1997