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. 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"><<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>></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>
(some-accessor some-posn))<br>
<br>
> (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>