[plt-scheme] recover a procedure body?

From: Ray Racine (rracine at adelphia.net)
Date: Wed Sep 25 21:51:57 EDT 2002

Sometime, every so often something like this pops up in Scheme  The
more you look at it the more you just have to admire it, shake your head
and admire it all the more, like a simple haiku, a wise aphorism or a
Shakespearean sonnet.

ALL HAIL!! 
Matthew Flatt - Poet Laureate of Scheme

Three forelock tugs in your honor.

Hmmm aren't Poet Laureates honored with some interesting but
non-monetary annual stipend?  

On Wed, 2002-09-25 at 08:21, Matthew Flatt wrote:
>  (module new-lambda mzscheme
> 
>   (provide (rename new-lambda lambda)
>            procedure-body
>            procedure-args)
>   
>   (define-values (struct:ap make-annotated-proc annotated-proc? ap-ref
ap-set!) 
>     (make-struct-type 'anotated-proc #f 3 0 #f null #f 0))
>   
>   (define procedure-args (make-struct-field-accessor ap-ref 1))
>   (define procedure-body (make-struct-field-accessor ap-ref 2))
>   
>   (define-syntax new-lambda
>     (syntax-rules ()
>       [(_ args . body)
>        (make-annotated-proc (lambda args . body) 'args 'body)])))

simple lines of Scheme
parenthesized poetry
capture pure intent







Posted on the users mailing list.