From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0KEN0ox009908 for ; Fri, 20 Jan 2012 15:23:05 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4BAPB3GU/RVaG2kGdsb2JhbABDrXoIIgEBAQEJCQ0HFAQhgXIBAQEEEgIsATgBAwwBBQULAwouIhIBBQEcBhMaCKMiCo5ZhHaJMAIFC4wbBJUZjhA9gU+CMA X-IronPort-AV: E=Sophos;i="4.71,542,1320620400"; d="scan'208";a="140746950" Received: from mail-gx0-f182.google.com ([209.85.161.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 20 Jan 2012 15:23:05 +0100 Received: by ggki1 with SMTP id i1so368893ggk.27 for ; Fri, 20 Jan 2012 06:23:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=7VSW1B5BXw1z2//8VW9Ibzgi0Otc+85uVvvJtgBNyak=; b=i2Eescla1EJZEgxto3QAFjv18tSJLwIYxMTyitapRFzaZ8BHIWoAXZnh4+GvXTtVFP 4aSd4O2trZrzVVhvcy8/pMR/roDDqvThnvoJk2eYIuPiGCipiB5g/RYguXcLP9oZ6H6v H3IjA3ZEgxzCSr/Ummp9iv8DYCgDSJ0MWOu/M= MIME-Version: 1.0 Received: by 10.50.57.234 with SMTP id l10mr389165igq.12.1327069383871; Fri, 20 Jan 2012 06:23:03 -0800 (PST) Sender: fabrissimo@gmail.com Received: by 10.42.155.1 with HTTP; Fri, 20 Jan 2012 06:23:03 -0800 (PST) In-Reply-To: References: <4F196C25.7070402@gmail.com> Date: Fri, 20 Jan 2012 15:23:03 +0100 X-Google-Sender-Auth: ivIJ22uwhlectj0y9pxpsIU-oas Message-ID: From: Fabrice Le Fessant To: David Allsopp Cc: Edgar Friendly , "caml-list@inria.fr" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] is there a more concise way to write this? On Fri, Jan 20, 2012 at 3:12 PM, David Allsopp wrote: > Maybe for this case with two variables, yes - but it can't do that indefinitely: as the number of variables increases, the code size increases exponentially. The problem is not the compilation of pattern-matching (number of tests will still be close to optimal), it is just that the number of cases to discriminate increases exponentially with the number of variables. --Fabrice