In Lisp, lists come in several different flavors; "proper lists" and "association lists (dotted pairs)".
DEMONSTRATION:
;; Setup
;; Checking
;; -If you run the following code you will get T(rue) for each list.
;; Execution
;; -MAPCAR takes--as it's arguments--a function name and a list but
;; if you run the following code you will get an error for the `alst`.
I have been told the a simple definition for a "proper list", in the Lisp languages, is the list is considered `proper` if the list's last CDR returns nil.
Define a function which will check if a list is `proper`.
EXAMPLE:
(properp '(1 2 3 4 5 6 7))
> T
(properp '(1 . 2))
> nil
(properp nil)
> nil