<DIV>You wrote: </DIV> <DIV>"Where should this missing letter get added in the result of <SPAN class=Apple-style-span style="COLOR: rgb(0,31,212)">(insert-in-single-word s (rest word))? Correct! At the beginning." </SPAN></DIV> <div> </div> <div>It's not possible to add missing letters...they are missing! </div> <div> </div> <div>What I need is a prefix function. For the word (list 'A 'T 'W), I need:</div> <div>cycle 1: (empty)</div> <div>cycle 2: (list 'A)</div> <div>cycle 3: (list 'A 'T)</div> <div>cycle 4: (list 'A 'T 'W)</div> <div> </div> <div>Unfortunately, the recursive function call, "insert-in-single-word (rest word)," results in smaller and smaller words:</div> <div>cycle 1: 'T 'W</div> <div>cycle 2: 'W</div> <div>cycle 3: empty</div> <div> </div> <div>I just spent 2 hours trying to define an auxiliary function or add some extra "appends" in the main function, in order to insert a prefix in front of the X,
but there is no way to add the missing letters. They are gone forever.</div> <div><BR><B><I>Matthias Felleisen <matthias@ccs.neu.edu></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR> <DIV>On Mar 27, 2008, at 10:04 PM, Cooke Kelsey wrote:<BR class=Apple-interchange-newline> <BLOCKQUOTE type="cite"><SPAN class=Apple-style-span style="WORD-SPACING: 0px; FONT: 12px 'Lucida Grande'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0"> <DIV>Hi, I think I see what you are driving at. </DIV></SPAN></BLOCKQUOTE>... <BR> <BLOCKQUOTE class="" type="cite"> <DIV style="MARGIN: 0px"><FONT style="FONT:
12px Lucida Grande" face="Lucida Grande" size=3>the words are missing the letter A, the first of the current (****) word</FONT></DIV></BLOCKQUOTE>... <BR> <BLOCKQUOTE type="cite"><SPAN class=Apple-style-span style="WORD-SPACING: 0px; FONT: 12px 'Lucida Grande'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0"> <DIV> <SPAN class=Apple-style-span style="COLOR: rgb(0,0,221); -webkit-text-stroke-width: -1">I thought of your reminder to use helper functions, e.g. "add-prefix," but I keep going back to this register idea. I don't know whether I am getting off track or what.</SPAN></DIV></SPAN></BLOCKQUOTE><BR></DIV> <DIV>What would "add-prefix" do? "Register" sounds
like an old man's way of thinking about machines and lower-level representations of computations yet. But add-prefix seems definitely related to the "it's missing the letter ..." part. </DIV> <DIV><BR></DIV> <DIV>Where should this missing letter get added in the result of <SPAN class=Apple-style-span style="COLOR: rgb(0,31,212)">(insert-in-single-word s (rest word))? Correct! At the beginning. </SPAN></DIV> <DIV><FONT class=Apple-style-span color=#001fd4><BR></FONT></DIV> <DIV><FONT class=Apple-style-span color=#001fd4>Keep going. -- Matthias</FONT></DIV> <DIV><FONT class=Apple-style-span color=#001fd4><BR></FONT></DIV><BR></BLOCKQUOTE><BR><p> 
<hr size=1>Looking for last minute shopping deals? <a href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping">
Find them fast with Yahoo! Search.</a>