[plt-scheme] Scoping of define/kw

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jul 25 14:40:02 EDT 2006

On Jul 25, Matt Jadud wrote:
> [...]
> (define/kw (extract-and-get-meta strukt strukt-key
>                                     #:key  [ethunk
>                                             (lambda ()
>                                               (error 'get-meta "No 
> metadata: ~a" strukt-key))])
>               (let ([m (node-meta strukt)])
>                 (hash-table-get m strukt-key ethunk)))
> ---
> 
> This code compiles under v350, but dies under 300/301.5 (those are
> the two previous versions I have laying around). It would appear
> that 'strukt-key' is in scope of the keyword parameter 'ethunk', but
> not in scope in 300/301? [...]

`strukt-key' *should* be in scope for the `ethunk' expression.  There
used to be a bug in the scope that I fixed long ago -- probably after
301 came out.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.