PSYC 315 Chapter 3: ELM - Lesson 3

9 views9 pages

Document Summary

Examples: (atom a) -> t (atom 6) -> t (atom (a b c)) -> nil (atom (first (a b c))) -> t (atom t) -> t (atom nil) -> t. Tests if an argument is a non-empty list. Examples (consp u) -> nil (consp 6) -> nil (consp (a b)) -> t (consp (cons a (cons b nil))) -> t. (consp (nil)) -> t (cons nil nil) -> nil. Tests whether an expression is a list. Accepts the empty list (nil) as a list. Examples: (listp (a b c)) -> t (listp nil) -> t (listp 12) -> nil (listp t) -> nil. Examples: (numberp number) -> nil (numberp 12) -> t (numberp t) -> nil (symbolp number) -> t (symbolp 12) -> nil (symbolp t) -> t (symbolp nil) -> t: equal. Tests whether two arguments are the same.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents