From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA24757; Mon, 2 Jul 2001 08:52:14 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA24753 for ; Mon, 2 Jul 2001 08:52:13 +0200 (MET DST) Received: from hotmail.com (f79.law15.hotmail.com [64.4.23.79]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f626qCb29752 for ; Mon, 2 Jul 2001 08:52:12 +0200 (MET DST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 1 Jul 2001 23:52:08 -0700 Received: from 205.188.199.24 by lw15fd.law15.hotmail.msn.com with HTTP; Mon, 02 Jul 2001 06:52:07 GMT X-Originating-IP: [205.188.199.24] From: "Jeremy Fincher" To: caml-list@pauillac.inria.fr Subject: [Caml-list] Some more code written by a newbie to be reviewed by *real* O'Caml coders :) Date: Mon, 02 Jul 2001 02:52:07 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 02 Jul 2001 06:52:08.0300 (UTC) FILETIME=[830362C0:01C102C3] Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I'm fairly new to O'Caml, and I hope that a few more experienced O'Caml programmers can review some of the code I've written to show me how things can be done better, what parts I've done that stray from O'Caml idiom, and so on...so here's some more code I hope a few people will take the time to review :) I'm coming from Python, so I figured one fairly simple thing I can do to ease the transition and get some practice working with O'Caml is to rewrite some of the more featureful python modules in O'Caml. Here's an implementation of most of the useful (read: stuff I've used :)) functions from the Python "string" module. Don't worry if you don't know Python or that module -- I've written an interface file that comments what each function is supposed to do. Here are the files: http://members.aol.com/jemfinch02/py_string.mli http://members.aol.com/jemfinch02/py_string.ml The one thing I think would be better done already is that the functions should probably take the string they're to operate on as their last argument, so new functions can be created more easily by partial function application. Anyway, if anyone does review this code, feel free to rip it apart -- I'm far more concerned with becoming a better O'Caml programmer than with keeping my pride :) Jeremy (PS: Sorry about the AOL links, but that's the ISP my family uses, and since I'm "en vacances" for the summer, it's what I'm stuck with :)) _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr