4
ELEMENTARY RECURSIVE DEFINE

4.1 HASAND

In this chapter we shall consider ways of defining more complicated functions than those considered in the previous chapter. Let us start with a very simple example. We want to write a function that will have value T if the atom AND is found in a list--for example, the list

(EAT DRINK AND BE MERRY FOR TOMORROW YE DIET)

--and will have value NIL if the atom AND is not found in the list--for example, the list (FRIEND OR ENEMA). We shall assume that all SEXes of the list are atoms. If we call the function HASAND, then in EVQ-LISP the value of

HASAND ( (EAT DRINK AND BE MERRY FOR TOMORROW YE DIET) )

will be T, while in EV-LISP the value of

(HASAND (QUOTE (FRIEND OR ENEMA) ))

will be NIL. In the terminology of Chapter 2, HASAND is a predicate since it can have only two values, T and NIL. Remember that EQ, NULL, and ATOM are also predicates.

-31-

Notes for this page

Add a new note
If you are trying to select text to create highlights or citations, remember that you must now click or tap on the first word, and then click or tap on the last word.
One moment ...
Default project is now your active project.
Project items
Notes
Cite this page

Cited page

Style
Citations are available only to our active members.
Buy instant access to cite pages or passages in MLA 8, MLA 7, APA and Chicago citation styles.

(Einhorn, 1992, p. 25)

(Einhorn 25)

(Einhorn 25)

1. Lois J. Einhorn, Abraham Lincoln, the Orator: Penetrating the Lincoln Legend (Westport, CT: Greenwood Press, 1992), 25, http://www.questia.com/read/27419298.

Note: primary sources have slightly different requirements for citation. Please see these guidelines for more information.

Cited page

Bookmark this page
Let's Talk Lisp
Table of contents

Table of contents

  • Title Page iii
  • Contents v
  • Preface xiii
  • 1 - A Language for the Computer 1
  • 2 - Elementary Sentences 6
  • 3 - Elementary Define 24
  • 4 - Elementary Recursive Define 31
  • 5 - Addmonal Recursive Definitions 51
  • 6 - Introduction to Map Functions and Lambda Expressions 82
  • 7 - Prog, Constants and Generators 96
  • 8 - Property Lists 114
  • 9 - The Lisp Interpreter Eval 128
  • 10 - Lisp Storage Structures 136
  • 11 - Miscellaneous Functions and Features 160
  • 12 - Some Larger Examples 169
  • Appendix A - Counting Parentheses 214
  • Appendix B - Quickie Introduction to Lisp for Experienced Programmers 217
  • Appendix C 224
  • A Lisp Bibliography 224
  • Appendix D - Some Errors in Lisp Programs 226
  • Index 235
Settings

Settings

Typeface
Text size Smaller Larger Reset View mode
Search within

Search within this book

Look up

Look up a word

  • Dictionary
  • Thesaurus
Please submit a word or phrase above.
Print this page

Print this page

Why can't I print more than one page at a time?

Help
Full screen
Items saved from this book
  • Bookmarks
  • Highlights & Notes
  • Citations
/ 240

matching results for page

    Questia reader help

    How to highlight and cite specific passages

    1. Click or tap the first word you want to select.
    2. Click or tap the last word you want to select, and you’ll see everything in between get selected.
    3. You’ll then get a menu of options like creating a highlight or a citation from that passage of text.

    OK, got it!

    Cited passage

    Style
    Citations are available only to our active members.
    Buy instant access to cite pages or passages in MLA 8, MLA 7, APA and Chicago citation styles.

    "Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences." (Einhorn, 1992, p. 25).

    "Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences." (Einhorn 25)

    "Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences." (Einhorn 25)

    "Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences."1

    1. Lois J. Einhorn, Abraham Lincoln, the Orator: Penetrating the Lincoln Legend (Westport, CT: Greenwood Press, 1992), 25, http://www.questia.com/read/27419298.

    Cited passage

    Thanks for trying Questia!

    Please continue trying out our research tools, but please note, full functionality is available only to our active members.

    Your work will be lost once you leave this Web page.

    Buy instant access to save your work.

    Already a member? Log in now.

    Search by... Author
    Show... All Results Primary Sources Peer-reviewed

    Oops!

    An unknown error has occurred. Please click the button below to reload the page. If the problem persists, please try again in a little while.