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.

I want to dynamically build and call the method rather than just dynamically
call the method.

On Tue, Sep 6, 2011 at 1:22 PM, Matthias Felleisen <[email protected]>wrote:

>
> In Racket, accessors are functions and are thus perfectly legitimate
> arguments:
>
> (define (foo some-posn some-accessor)
>  (some-accessor some-posn))
>
> > (foo my-posn posn-x)
> 3
>
>
>
>
>
>
>
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to