PSYC 315 Chapter 3: ELM - Lesson 3
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.