6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology Slide 8.2.1 Having the ability to intermix numbers and symbols in ing other expressions expressions is a very useful thing, and as a consequence w would like to be able to generalize this to all sorts of data structures. Since our primary data structure is a list, it would be nice if we had the ability to quote list structure, in addition to simple names 6001S Slide 8.2.2 Generalization: quoting other expressions In fact, our reader and evaluator will do this for us. Since the Reader converts to Prints out as fundamental representation of expressions in our language is in terms of lists and list structure, the reader is set up to convert every typed in expression into list structure. This is true for any 2.《quot。(ab) expression created out of parentheses, which denote the boundaries of the list structure few lectures, the evaluator is then set up te 3.《quot1) take that list structure and manipulate it according to the rules of evaluation, to determine the meaning of the expression In general, (quote DATUM)is converted to DATUM In the case of the special form quote, however, the evaluator 6001 SICP I simply passes on the list structure, without any evaluation. Thus in general, quoting a printed representation of a list structure including sublists of numbers and symbols, gets converted to the appropriate list structure internally, and then returned. Its printed representation will then match the original expression Slide 8.2.3 names of things and their values. for virtually every kindon nis is nice, because quote now let's us distinguish between Shorthand: the single quote mark structure. Of course, writing out long expressions involving the shorthand for (quote a) special symbol quote is a bit tedious, so we have a nice shorthand in Scheme, namely the single quote mark. Thus, 'a is just a shorthand for (quote a). And ' (1 2)is just a shorthand notation for (quote (1 2))which we already saw is shorthand for (list (quote 1)(quote 2)). This means in general that placing a'in front of the printed representation for any list structure will cause the evaluator to create the corresponding list structure 6m: SICP6.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. Slide 8.2.1 Having the ability to intermix numbers and symbols in expressions is a very useful thing, and as a consequence we would like to be able to generalize this to all sorts of data structures. Since our primary data structure is a list, it would be nice if we had the ability to quote list structure, in addition to simple names. Slide 8.2.2 In fact, our reader and evaluator will do this for us. Since the fundamental representation of expressions in our language is in terms of lists and list structure, the reader is set up to convert every typed in expression into list structure. This is true for any expression created out of parentheses, which denote the boundaries of the list structure. As we will see in a few lectures, the evaluator is then set up to take that list structure and manipulate it according to the rules of evaluation, to determine the meaning of the expression. In the case of the special form quote, however, the evaluator simply passes on the list structure, without any evaluation. Thus in general, quoting a printed representation of a list structure, including sublists of numbers and symbols, gets converted to the appropriate list structure internally, and then returned. Its printed representation will then match the original expression. Slide 8.2.3 This is nice, because quote now let's us distinguish between names of things and their values, for virtually every kind of structure. Of course, writing out long expressions involving the special symbol quote is a bit tedious, so we have a nice shorthand in Scheme, namely the single quote mark ' . Thus, 'a is just a shorthand for (quote a). And '(1 2) is just a shorthand notation for (quote (1 2)) which we already saw is shorthand for (list (quote 1) (quote 2)). This means in general that placing a ' in front of the printed representation for any list structure will cause the evaluator to create the corresponding list structure