On Jun 21, 2014, at 3:22 PM, Matthias Felleisen <matth...@ccs.neu.edu> wrote:

> 
> Thanks. We will need to figure out how to accommodate keywords in a 
> teachpack. 
> 
> In the meantime, write frame like this: 
> 
> (define (frame-2 img 
>                 #:frame-color (frame-color 'black)
>                 #:background-color (background-color 'transparent)
>                 #:frame-offset (frame-offset 0)
>                 #:frame-x-offset (frame-x-offset frame-offset)
>                 #:frame-y-offset (frame-y-offset frame-offset))
>  (define width (+ (image-width img) frame-x-offset))
>  (define height (+ (image-height img) frame-y-offset))
>  (overlay (rectangle width height 'outline frame-color)
>           (center-crop width height img)
>           (rectangle width height 'solid background-color)))
> 
> Prefer define over let. -- Matthias
> 

Thanks! Is there any documentation or guide on which “styles” to prefer in 
writing Racket code? I find myself scratching my head at times in these matters!

-Kevin
_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Reply via email to