Subject: Iteration with named let From: "W. Eliot Kimber" <eliot@xxxxxxxxxx> Date: Tue, 24 Jun 1997 15:44:17 -0500 |
Ok, thanks to the samples from folks, I think I'm starting to understand this interation stuff (I don't know why it's so hard beyond too many years doing for and while loops). 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)) ) ) ) ) There's probably an easier way, except that Jade doesn't support match-element?. Have I done this correctly? Thanks, Eliot DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Desperate Questions: [1]Absolut, Paul Prescod | Thread | Re: Iteration with named let, Vivek Agrawala |
Re: Desperate Questions: [1]Absolut, W. Eliot Kimber | Date | Re: Desperate Questions: [1]Absolut, David Megginson |
Month |