[plt-scheme] Re: to define, or to let

From: Joe Marshall (jrm at ccs.neu.edu)
Date: Fri Apr 9 10:02:07 EDT 2004

Bill Richter <richter at math.northwestern.edu> writes:

> Then here's a dumb question:  I do this all the time:
>
>         (let* ([x (first L)]
>                [p (first x)]
>                [q (second x)]) 
>
> The alternative seems to be nested lets, or not to use the shortcuts p
> and q.  I don't like either one.  Even if I'm only going to use p and
> q once, I still want to give 'em names!

(match L
  (`((,p ,q) . ,rest) 
     <....>)
  (_ (error "Wrong format.")))



Posted on the users mailing list.