caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: YC <yinso.chen@gmail.com>
To: "Daniel Bünzli" <daniel.buenzli@epfl.ch>
Cc: "caml-list List" <caml-list@inria.fr>
Subject: Re: [Caml-list] best and fastest way to read lines from a file?
Date: Mon, 1 Oct 2007 15:29:09 -0700	[thread overview]
Message-ID: <779bf2730710011529o74c08c2ah2fcfb086687b796b@mail.gmail.com> (raw)
In-Reply-To: <2045B477-66BF-4A22-912F-DFB5E6D30570@epfl.ch>

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 663 bytes --]

  reply	other threads:[~2007-10-01 22:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-01 21:27 YC
2007-10-01 21:55 ` [Caml-list] " Daniel Bünzli
2007-10-01 22:29   ` YC [this message]
2007-10-01 21:55 ` Olivier Roussel
2007-10-02 12:39   ` Mattias Engdegård
2007-10-02 12:56     ` Brian Hurt
2007-10-02 16:15       ` kirillkh
2007-10-02 17:10         ` verlyck, Bruno.Verlyck
2007-10-02 18:02         ` kirillkh
2007-10-02 19:35           ` skaller
2007-10-02 21:05             ` kirillkh
2007-10-02 21:07               ` Jon Harrop
2007-10-02 20:23           ` Olivier Andrieu
2007-10-02 20:49             ` kirillkh
2007-10-02 21:10               ` Jon Harrop
2007-10-02 21:15               ` David Allsopp
2007-10-02 22:23                 ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=779bf2730710011529o74c08c2ah2fcfb086687b796b@mail.gmail.com \
    --to=yinso.chen@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@epfl.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).