caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dustin Sallings <dustin@spy.net>
To: Florian Hars <hars@bik-gmbh.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] newbie type problem
Date: Wed, 29 Oct 2003 00:03:46 -0800	[thread overview]
Message-ID: <6BC5D6B8-09E6-11D8-B772-000393CFE6B8@spy.net> (raw)
In-Reply-To: <3F9F6AE6.9030102@bik-gmbh.de>


On Oct 28, 2003, at 11:23 PM, Florian Hars wrote:

> let parse_logfile filename =
>   let ic = open_in filename in
>   let start_events, transactions =
>     Textfile.fold operate_on_line (M.empty, M.empty) ic in
>   close_in ic;
>   cleanup_dangling_events start_events transactions
>
> let _ = print_transaction_info (parse_logfile "my_logfile")

	What is Textfile?  I wrote something very similar to what I think this 
is in scheme (from which this thing is being ported somewhat slowly):

; Loop on input, pass each line to function f.
; Optional argument should be either a port, or a filename.  If not
; provided, (current-input-port) will be used.
(input-loop f . other)

; A conditional input loop (only loop on a line if (c line) is true)
(conditional-input-loop c f . other)

	I'll probably do the same thing in caml when I get this a little more 
out of the toy phase.

	Thanks for the input.

-- 
Dustin Sallings

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-10-29  8:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-24  6:11 Dustin Sallings
2003-10-23 23:32 ` David Brown
2003-10-24  6:54   ` Dustin Sallings
2003-10-24  0:52     ` David Brown
2003-10-24  8:21       ` Dustin Sallings
2003-10-24 12:49         ` Andrew Lenharth
2003-10-24 13:22           ` Remi Vanicat
2003-10-29  7:23         ` Florian Hars
2003-10-29  8:03           ` Dustin Sallings [this message]
2003-10-29 16:27             ` Florian Hars
2003-10-24  9:25     ` Hendrik Tews
2003-10-24 16:23       ` Dustin Sallings

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=6BC5D6B8-09E6-11D8-B772-000393CFE6B8@spy.net \
    --to=dustin@spy.net \
    --cc=caml-list@inria.fr \
    --cc=hars@bik-gmbh.de \
    /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).