Hi, <br><br>I&#39;m trying to something along the following lines:<br><br>&gt; (define-struct posn (x y))<br>&gt; (define my-posn (3 4))<br>&gt; (define (foo posn-instance field)<br> (posn-field posn-instance))<br><br>
where calling <br><br>(foo my-posn &quot;x&quot;) <br><br>would dynamically substitute posn-field with posn-x and the function would return 3.<br><br>I don&#39;t know what to do with either &quot;x&quot; or posn-field to get this to work. I *think* I&#39;m looking for something like a string-&gt;function function, where I could pass in &quot;x&quot; and posn-field would be replaced by <br>
<br>(string-&gt;function (string-append &quot;posn-&quot; field)) <br><br>I just don&#39;t know if there&#39;s something that currently serves that purpose or, if not, how to go about creating that function.<br><br>Thanks, <br>
<br>Todd<br>