Lists in Prolog
Lists in Prolog
The Prolog symbols in previous chapters were single atomic units: constants, variables, numbers. This chapter considers larger symbolic structures called lists, and some predicates that assemble them and take them apart. Section 7.1 introduces lists and the two notations in Prolog that are used for them. Section 7.2 considers how to write the clauses for predicates that take lists as arguments, allowing properties over groups of objects to be expressed very succinctly. Section 7.3 explains how to use two very useful built-in list predicates, member and append, and reformulates in a clear and concise way the blocks-world program from Section 4.2.
Keywords: Prolog programming, lists, member, list predicates, blocks-world program
MIT Press Scholarship Online requires a subscription or purchase to access the full text of books within the service. Public users can however freely search the site and view the abstracts and keywords for each book and chapter.
Please, subscribe or login to access full text content.
If you think you should have access to this title, please contact your librarian.
To troubleshoot, please check our FAQs, and if you can't find the answer there, please contact us.