[racket] general facility for annotating procedures

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Apr 21 16:07:42 EDT 2011

Here's a quick little example using `prop:procedure':

https://gist.github.com/935350

On Thu, Apr 21, 2011 at 5:06 PM, Eric Tanter <etanter at dcc.uchile.cl> wrote:
> Ah, this is wonderful!
>
> not only does it exist, but in a better way than I had dreamed of ;-)
> I wish I had known about that long ago...
>
> Thanks!
>
> -- Éric
>
>
> On Apr 21, 2011, at 3:59 PM, Neil Van Dyke wrote:
>
>> Eric Tanter wrote at 04/21/2011 04:55 PM:
>>> Something along the lines of:
>>> (lambda #:prop key val (x) x)
>>> and then have `procedure-properties' as means to retrieve the different properties for introspection.
>>>
>>
>> One thing that might serve your needs is to define a struct that can be applied like procedure.  Search for "prop:procedure".
>>
>> --
>> http://www.neilvandyke.org/
>>
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
sam th
samth at ccs.neu.edu



Posted on the users mailing list.