Subject: Re: Detecting Infinite Looping From: "W. Eliot Kimber" <eliot@xxxxxxxxxx> Date: Thu, 29 Jan 1998 09:32:18 -0600 |
At 09:40 AM 1/29/98 +0000, Henry Thompson wrote: >PS. You can see the tail recursion more clearly by using a named 'let' > >(define f1 > (lambda (arg) > (let loop ((x arg) > (result BASE)) > (if P > result > (loop NEXT (append result (list F))))))) This is the basic construction I'm using, but I thought I had a problem in that I'm using a number of separate functions that individually don't have access to the entire list, but maybe that's just because I didn't think to pass the list as a parameter to my functions? The basic logic stream is this: refatt-to-nodelist calls either id-to-nodelist or node-to-nodelist id-to-nodelist calls node-to-nodelist node-to-nodelist calls form-specific xloc-to-nodelist, one for each type of locaddr calls either id-to-nodelist or node-to-nodelist as appropriate I think all I have to do is pass the result list from the highest-level function to each recursively called function in order to be able to check membership, right? Also, what is the significance of the lamba in the above? I've never been able to grasp the significance of using lamba instead of a simple let statement. I know it has something to do with variable binding and scope, but I'm dashed as to what it is. I'm the sure the problem is with name lambda--it means nothing to me (at least with respect to mathematics--it does have a political connotation, at least in the United States). Thanks, E. -- <Address HyTime=bibloc> W. Eliot Kimber, Senior Consulting SGML Engineer Highland Consulting, a division of ISOGEN International Corp. 2200 N. Lamar St., Suite 230, Dallas, TX 95202. 214.953.0004 www.isogen.com </Address> DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Detecting Infinite Looping, Gavin Nicol | Thread | Re: Detecting Infinite Looping, hanche+dsssl-l |
RE: Detecting Infinite Looping, Gavin Nicol | Date | Re: Detecting Infinite Looping, hanche+dsssl-l |
Month |