<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Are you reading the desired field name from somewhere?&nbsp;</div><div><br></div><div><br></div><br><div><div>On Sep 6, 2011, at 2:29 PM, Todd Bittner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Right, but what I want to do in this case is pass in 'x' and dynamically construct posn-x rather than pass in the accessor 'posn-x' itself.&nbsp; In other words, I know I want to call a posn accessor, but I don't know which one yet.<br>
<br>I want to dynamically build and call the method rather than just dynamically call the method.<br><br><div class="gmail_quote">On Tue, Sep 6, 2011 at 1:22 PM, Matthias Felleisen <span dir="ltr">&lt;<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
In Racket, accessors are functions and are thus perfectly legitimate arguments:<br>
<br>
(define (foo some-posn some-accessor)<br>
 &nbsp;(some-accessor some-posn))<br>
<br>
&gt; (foo my-posn posn-x)<br>
3<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br></div></div>
<br>
</blockquote></div><br>
</blockquote></div><br></body></html>