Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Why Not Tail-Recursive?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-10-26 (18:40)
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).