COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
What is the difference between [[ and $ used on a list?
|
[[ is type-safe
|
|
[[ always returns a list
|
|
[[ requires quotes (")
|
|
None of the above
|
Explanation:
Detailed explanation-1: -There is an incredibly important difference between them: list is a plain old function, while quote (even without the special ‘ syntax) is a special form. That is, list can be implemented in plain Scheme, but quote cannot be.
Detailed explanation-2: -quote takes exactly one argument, and returns a data structure whose printed representation is the same as what you typed in as the argument to quote . Scheme does not evaluate the argument to quote as an expression–it just gives you a pointer to a data structure.
There is 1 question to complete.