<font color="#003300"><font size="2"><font face="tahoma,sans-serif">I am currently working on Structure Definitions and am hoping that I can get some feedback through this mailing list on whether I am doing things correctly or not.<br>
<br></font></font></font><b>Exercise 6.4.3.</b>
Provide a structure definition and a data definition for representing
three-letter <code class="scheme"><span class="variable">word</span></code>s. A word consists of letters, which we
represent with the symbols <code class="scheme"><span class="keyword">'</span><span class="variable">a</span></code> through
<code class="scheme"><span class="keyword">'</span><span class="variable">z</span></code>. <br><br>Here is what I have come up with.<br><br>;; word : symbol -> symbol<br>; produce a word with the letters it's made of.<br>
; word is a structure<br>; (make-word first-letter second-letter third-letter)<br>; where first-letter, second-letter, and third-letter are symbols 'a thru z'<br><br>(define-struct word (first-letter second-letter third-letter))<br>
(define cat (make-word 'c 'a 't))<br><br>Using the interactive prompt I can do the following:<br>> (word-first-letter cat)<br>'c<br>> (word-third-letter cat)<br>'t<br>