Version française
Home     About     Download     Resources     Contact us    
Browse thread
best and fastest way to read lines from a file?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: YC <yinso.chen@g...>
Subject: Re: [Caml-list] best and fastest way to read lines from a file?
Thanks to everyone replied - your answers are extremely helpful.

> Your function is not tail recursive. A function is tail-recursive if
> there is nothing to do after the recursive call. You might believe
> this is the case in your function, but it is not the case because of
> the exception handler. Try this instead :

I did wonder whether my function was tail recursive but thought maybe it
is.  Thanks for the correction from everyone on this point.  And the pattern
of returning Some or None makes sense to me now.  Rerun the test makes me
feel better ;)

Thanks,
yc