CS116 Chapter Notes - Chapter 3: Empty String, Trie, Seed
30 views2 pages
1 Feb 2015
School
Department
Course
Professor
Document Summary
Comparison: function that consumes two numbers and produces a boolean value. The special forms and and or can have two+ arguments and is true when all arguments have value true or is true when at least one of its arguments us true. The function not is true when one argument is false. Simplifications for and: (and true exp ) yields (and exp ) (and false exp ) yields false (and) yields true. Last rule is when all arguments evaluate to true. 3. (or true exp ) yields true (or false exp ) yields (or exp ) (or) yields false. A predicate function produces a boolean result: true if data = particular form, false otherwise. Each argument of cond is a question/answer pair. The answer is a possible value of the conditional expression. As soon as one question is found that evaluates to true, no further questions are evaluated.