[dssslist] in reply to: "define inside let body"

Subject: [dssslist] in reply to: "define inside let body"
From: tgrzej <tgrzej@xxxxxxxx>
Date: Wed, 9 Feb 2005 18:24:26 +0100 (CET)
> >Hi, I am trying to understand the dsssl standard document (ISO/IEC 
> >10179:1996(E). Trying to put this example to work with openjade, 
> part 
> >8.4 "Definitions" of the document, at top level: 
> > 
> >(define p 
> >   (let ((x 5)) 
> >     (define foo (lambda (y) (bar x y))) 
> >     (define bar (lambda (a b) (+ (* a b) a))) 
> >     (foo (+ x 3))) 
> >) 
> 
> Hi, 
> I'am rather inexperienced but I'll try to answer. 
> The former should look like: 
> (define p 
>    (let ((x 5) 
>      (foo (lambda (y) (bar x y))) 
>      (bar (lambda (a b) (+ (* a b) a)))) 
>      (foo (+ x 3))) 
> ) 
> It won't work anyway because of recursive definitions, but now at 
> least it should be accepted by jade. 
> 
> >According the standard. body is described (in the same page) as 
> > 
> > [69] body=definition* expression 
> 
> In your code you repeat expression part 3 times, so it is not very 
> correct. 
> 
> Greetings, 
Tomek 
 
P.S. 
Sorry for quoting

Current Thread