Browse thread
Why Not Tail-Recursive?
-
Ruchira Datta
- hubert.fauque@w...
- bcpierce@c...
- Alain Frisch
- John Prevost
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | bcpierce@c... |
| Subject: | Re: Why Not Tail-Recursive? |
> The only thing I can think of is that the functions deepen and next_path
> are not actually tail-recursive as I expected them to be. But why not?
Because each call installs a new exception handler. To make them
tail-recursive, you need to change the style a little (e.g., make them
return an option instead of raising an exception).
B