<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div><br></div><div>Here is a definition of 'adding in the missing element': </div><div><br></div><div>* If a list X misses the symbol 'A (at the front), how do you get a list that has the 'A and all of X? </div><div><br></div><div>* X = (list 'X 'T) and 'A --> I want (list 'A 'X 'T). How do I do that? </div><div><br></div><div>-- Matthias</div><div><br></div><div><br></div><br><div><html>On Mar 28, 2008, at 2:54 AM, Cooke Kelsey wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite"><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 &lt;<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>></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><div>       <br class="khtml-block-placeholder"></div><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></blockquote></div><br></body></html>