Functions for Program Structure
Logic Statements
- Any time you test for true/false (i.e. if statements), you are really testing to see if the result is NOT nil
- Special variable automatically defined in LISP - t or T, has a value of 'T, commonly called true
- To manage difficult logic, use combinations of:
- OR - Returns true if ANY of the statements inside it are true,
- checks them in order and will stop checking as soon as a true statement is found
- AND - Returns true if ALL of the statements inside it are true
- must check ALL the statements
- NOT - flips the statement - Returns true if the statement inside if nil (false)