From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p3E8PIxU003393 for ; Thu, 14 Apr 2011 10:25:18 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMIALmupk3B/BfWcGdsb2JhbACYS41GAQwIDgcUJcEBhW4EjW+Dcw X-IronPort-AV: E=Sophos;i="4.64,210,1301868000"; d="scan'208";a="92841881" Received: from msa05.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.214]) by mail4-smtp-sop.national.inria.fr with ESMTP; 14 Apr 2011 10:25:12 +0200 Received: from [192.168.1.20] ([83.204.161.52]) by mwinf5d17 with ME id XLRB1g00X18830b03LRB1M; Thu, 14 Apr 2011 10:25:12 +0200 Message-ID: <4DA6AF68.2050204@lexifi.com> Date: Thu, 14 Apr 2011 10:25:12 +0200 From: Denis Berthod User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Nicely written Caml/OCaml code to read. Hi, Some years ago, when I was a student, I found the code of Gérôme Vouillon's LWT library enlightning (LWT is now part of the Ocsigen project). Even if a great part of the concepts are OCaml only I recall that there is a Fibonacci heap implementation that might be a good example of list manipulation. Cheers, Denis Le 13/04/2011 22:40, Create Software a écrit : > Hi all, > > I'll be taking exams at the end of the year (starting in a week, > actually), which include programming / informatics tests. The language > used in these exams is Caml Light (you guessed right: grandes écoles). > > I've done a lot of programming in previous years, but I didn't know > Caml/OCaml before high school -- I come from a mixed C++/C# world, > with drops of Python here and there. > > In developing my skill in other languages, I always found that reading > good code at some point was a great boost to the beauty and cleanness > of the programs I wrote. Usually, every language has it's own > conventions, best practices, and I think you can usually learn a lot > by reading well-written, nicely-crafted code. > > So here's my question: **which code would you recommend to read?** > > (As a side note, I'm not really interested (at least in the very short > term) in anything on the object-oriented side of the language, since > the notions used at the exam are limited to the elements available in > Caml Light.) > > I've tried batteries and Jane street core/ext-core libraries, but the > former has extremely few comments, and the latter is too widely > optimized to be enjoyable to read (Jane street's map function is 30 > lines long due to loop unrolling). > > Anything that deals with trees or finite state automata gets extra > brownie points =) (and +2 if Gabriel Scherer answers) > > Thanks for your help! > Clément. >