<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Saying that (quote (1 2 3)) evaluates to (quote (1 2 3)) [instead to (1 2 3)] is the same nonsanse to me like saying that (+ 1 2) evaluates to (+ 1 2) [instead to 3].<br> <BR><div>> From: sk@cs.brown.edu<br>> Date: Sun, 18 Sep 2011 11:15:41 -0400<br>> Subject: Re: [racket] Quoted expressions in #lang racket<br>> To: racketnoob@hotmail.com<br>> CC: users@racket-lang.org<br>> <br>> Yep, that's what he's saying.<br>> <br>> I know why you're confused. Let me see if I can help.<br>> <br>> Here's an input program:<br>> <br>> '(1 2 3)<br>> <br>> Now be careful to make the following distinction:<br>> <br>> - what it computes<br>> - what it prints<br>> <br>> What it computes is a list with three values. There are at least<br>> three different ways to PRINT this:<br>> <br>> 1. (1 2 3)<br>> 2. #<list><br>> 3. (quote (1 2 3))<br>> <br>> The first has the disadvantage Matthias pointed out: you can't paste<br>> the value back in in a bigger computation. The second has the same<br>> disadvantage. The third has the advantage you can paste it back in.<br>> <br>> You're probably concerned that pasting it back in "makes a new list".<br>> Yes, it does. But if the expression '(1 2 3) were part of some bigger<br>> computation -- eg,<br>> <br>> (length '(1 2 3))<br>> <br>> -- then no "new list" would be created. So it's only if you try<br>> copying the output of one computation as the input of another that<br>> there might be new allocation. But look at the word I just used:<br>> "copy".<br>> <br>> This isn't the full answer, but I think you need to make sure you've<br>> got at least these steps under your belt before we go further. Do ask<br>> questions.<br>> <br>> Shriram<br></div>                                            </div></body>
</html>