6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology Slide 8.1.22 The operation eq? tests for the same object Here is an example of what we mean by that. If we apply eg a primitive procedure returns #t if its two arguments are the same object to two arguments that evaluate to the same symbol, we get a very fast true" value returned otherwise a "false" value is returned ote e te delta)(quote eps))==> Slide 8.1.23 The operation eq? tests for the same object Finally, here is the type of eq? It accepts two arguments of a primitive procedure any type other than a number or a string, and returns a boolean returns #t if its two arguments are the same object value. based on the rules described above (eq? s)(cue e delta) For those who are interested otype, EQtype b。o1ea e= any type except number or string The operation eq? tests for the same object Slide 8.1.24 For numbers, we have a separate procedure to test equality, and if its two arguments are the same object a different procedure to testing equality of strings. Everything very fast else uses eq? (eg? (quote eps)(quote ep te delta)(quote ->#t This now completes our method for creating and dealing with )==> eq?: E&type, etype boolean i Etype any type except number or string 6.001 Notes: Section 8.26.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. Slide 8.1.22 Here is an example of what we mean by that. If we apply eq? to two arguments that evaluate to the same symbol, we get a "true" value returned, otherwise a "false" value is returned. Slide 8.1.23 Finally, here is the type of eq?. It accepts two arguments of any type other than a number or a string, and returns a Boolean value, based on the rules described above. Slide 8.1.24 For numbers, we have a separate procedure to test equality, and a different procedure to testing equality of strings. Everything else uses eq?. This now completes our method for creating and dealing with symbols. 6.001 Notes: Section 8.2