From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 87831BBAF for ; Sat, 2 Oct 2010 16:47:43 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjoCAP/ipkzRVda2kGdsb2JhbACiNggVAQEBAQkJDAcRAx+maIlEgheFfi6IVQEBAwWFPwSKPA X-IronPort-AV: E=Sophos;i="4.57,271,1283724000"; d="scan'208";a="67901716" Received: from mail-iw0-f182.google.com ([209.85.214.182]) by mail2-smtp-roc.national.inria.fr with ESMTP; 02 Oct 2010 16:47:43 +0200 Received: by iwn10 with SMTP id 10so74098iwn.27 for ; Sat, 02 Oct 2010 07:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=DATJBwbe2CRbMxjpykvoshBH5tKXrNkhz8Ts9NV89Rk=; b=GrQVGCxiPsPQtr3JcUX4PT82nw+1igoXtC9WqfYyJ3AqRZ8qAgInh62MtHi4UwjOxe 5Bq/g1VyeIB0Ly5ejEQpPmTjs8Km3ImVQrhKcHkUMSuBgAOCxeoqicvrHKnuwDL80af6 g51eaLBHhC/ZTZA5tIzfYwA/ENOpHc13AHmxU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=uqidIayZn/14mMpMNntIytudiXqCbDoq9R5kjasRXIXZ3E2PbB5g8FnDC4dI4pNhz5 z+0NCRLmT1uBZsbWHpUXBRcVlO1I2VQPhAlBOLXwEPZxmmUcj0ZFgMgZ3wEFOBQAXgA6 6CcK+qqhwohrf/OQ8EoOPYuGyx2aLMWvExSBA= MIME-Version: 1.0 Received: by 10.231.173.144 with SMTP id p16mr7322160ibz.108.1286030861771; Sat, 02 Oct 2010 07:47:41 -0700 (PDT) Received: by 10.231.174.130 with HTTP; Sat, 2 Oct 2010 07:47:41 -0700 (PDT) In-Reply-To: <1286029361.2168.47.camel@io> References: <1286029361.2168.47.camel@io> Date: Sat, 2 Oct 2010 16:47:41 +0200 Message-ID: Subject: Re: [Caml-list] from if...else to pattern matching From: ben kuin To: Philip , caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; val:01 bool:01 caml-list:01 int:01 match:02 let:03 let:03 pattern:04 anyway:05 matching:05 function:08 fun:08 similar:12 but:14 stopped:83 > > # let t x = match x with > a when x<=4 -> true > | _ -> false;; > ok, I had a similar attempt with let tt x = function a when x<=4 -> true | _ -> false;; but that gave me the following (scary -> 'a -> ) signature val tt : int -> 'a -> bool = so I stopped thanks anyway