Re: Iteration with named let

Subject: Re: Iteration with named let
From: "W. Eliot Kimber" <eliot@xxxxxxxxxx>
Date: Tue, 24 Jun 1997 16:35:50 -0500
At 05:25 PM 6/24/97 -0400, you wrote:
>> 
>> Here's a function I created to determine if a child has a particular GI:
>> 
>> (define (has-child? %gi% %element%)
>>   (let loop ((desc-list (children %element%)))
>>     (if (equal? (gi (node-list-first desc-list)) %gi%)
>>        #t
>>        (if (node-list-empty? desc-list)
>>           #f
>>           (loop (node-list-rest desc-list))
>>       )
>>     )
>>   )
>> )

>Yes. One stylistic comments though. You've probaby noticed 
>that many DSSSL programmers use a different parentheses syntax. It saves 
>screen real estate. 

I have such a difficult time keeping parens matched (even with a
bracket-matching editor), that I have to do the above or I go nuts trying
to figure out where the missing paren is.  Vertical space isn't really an
issue for me (at least while I'm working on my big display at home).

I'm about one free weekend away from defining a DTD for DSSSL expressions
so I can create the DSSSL specs using an SGML editor (and then, of course,
write a DSSSL spec to generate a DSSSL spec from the resulting document).
Then no more worries about paren matching or remembering all the built-in
function names or their parameters.  It's a lot easier to write the DTD and
the output spec then to build a syntax-specific editor from scratch.

Cheers,

E.

 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread