From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 297A1800DB for ; Thu, 9 Mar 2017 21:22:48 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.36,137,1486422000"; d="scan'208";a="216212842" Received: from bou78-2-82-240-46-163.fbx.proxad.net (HELO MP-41019.local) ([82.240.46.163]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 09 Mar 2017 21:22:47 +0100 To: Gabriel Scherer References: <58C19FF4.1030200@inria.fr> Cc: KC Sivaramakrishnan , caml users From: =?UTF-8?Q?Fran=c3=a7ois_Pottier?= Message-ID: <58C1B996.4090400@inria.fr> Date: Thu, 9 Mar 2017 21:22:46 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] [ANN] New release of visitors Hello Gabriel, Le 09/03/2017 20:17, Gabriel Scherer a écrit : > This use of the monoid structure is very nice. I believe that you > could cut through the intermediate tree structure as follows. Is there > any downside? You are right, Gabriel, my code is a defunctionalized version of yours, which is much shorter. Nice! I don't think there is any significant downside. You lose the ability to perform the little optimization in my method [plus]. I don't see any other downside. I take this opportunity to add that, although my previous solution duplicates the definition of the type [sometree], this is actually not necessary. I will probably prepare a blog post with a cleaned up solution... -- François Pottier francois.pottier@inria.fr http://gallium.inria.fr/~fpottier/