Jump to ContentJump to Main Navigation
Thinking as ComputationA First Course$
Users without a subscription are not able to see the full content.

Hector J. Levesque

Print publication date: 2012

Print ISBN-13: 9780262016995

Published to MIT Press Scholarship Online: August 2013

DOI: 10.7551/mitpress/9780262016995.001.0001

Show Summary Details
Page of

PRINTED FROM MIT PRESS SCHOLARSHIP ONLINE (www.mitpress.universitypressscholarship.com). (c) Copyright The MIT Press, 2022. All Rights Reserved. An individual user may print out a PDF of a single chapter of a monograph in MITSO for personal use.date: 27 May 2022

Lists in Prolog

Lists in Prolog

(p.136) (p.137) 7 Lists in Prolog
Thinking as Computation

Levesque Hector J.

The MIT Press

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.