Difficulty: Easy
Correct Answer: quit
Explanation:
Introduction / Context:
Lisp has been a foundational language for symbolic AI, knowledge representation, and rapid prototyping. Interactive Lisp systems (REPLs) provide a command-line loop for evaluating expressions. Exiting the REPL is a common task; different implementations may offer several commands, but one has been historically ubiquitous.
Given Data / Assumptions:
Concept / Approach:
The conventional command to terminate a Lisp session is quit (often invoked as the symbol or function (quit)). Many Lisp systems also accept synonyms like exit or bye, but quit is the canonical and most frequently documented choice in AI textbooks and tutorials.
Step-by-Step Solution:
1) At the Lisp prompt (REPL), prepare to end the session.2) Type quit (or evaluate (quit) depending on the implementation).3) The interpreter cleans up and returns control to the operating system shell.
Verification / Alternative check:
Consult the help or manual for the specific Lisp (e.g., SBCL, CLISP, Allegro). You will find quit documented, with possible aliases. Running a quick test in a REPL confirms it terminates the session.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to use parentheses in dialects expecting a function call; assuming a shell-style exit command in all Lisps.
Final Answer:
quit
Discussion & Comments