home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!bonnie.concordia.ca!cerberus.ulaval.ca!chicoutimi!vachon
- From: vachon@chicoutimi.gel.ulaval.ca (Pierre Vachon)
- Newsgroups: comp.lang.lisp
- Subject: Advice on recursion?
- Message-ID: <1992Jul23.192749.129@cerberus.ulaval.ca>
- Date: 23 Jul 92 19:27:49 GMT
- Sender: news@cerberus.ulaval.ca
- Organization: Universite Laval, Ste-Foy, Quebec (Canada)
- Lines: 26
- Originator: vachon@chicoutimi
-
- Hi,
-
- Concerning recursive procedures, I would like to know the following:
-
- Are there disadvantages to using 'labels' like this:
-
- (defun foo (arg)
- (let ((...))
-
- (labels ((recursive (arg1 arg2)
- (body)))
- (recursive 'foo 'bar))))
-
- I know it works, and I like the fact that it's 'clean',
- since the alternative would be to DEFUN the recursive part
- and even require some special variables, which the LET in
- the previous example helps me avoid...
-
- (Of course, the recursive function is only used by FOO,
- which is why I like to avoid defunning (!) it on Top Level...)
-
- So, how do YOU 'recurse'...?
-
-
- Pierre Vachon Laboratoire de vision et systemes numeriques
- vachon@gel.ulaval.ca Universite Laval, Quebec, Canada.
-