From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E083EBC69 for ; Wed, 18 Jul 2007 00:43:02 +0200 (CEST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6HMh2p5004955 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 18 Jul 2007 00:43:02 +0200 Received: from [80.229.56.224] (helo=beast.local) by ptb-relay03.plus.net with esmtp (Exim) id 1IAvkz-0000vk-Up for caml-list@yquem.inria.fr; Tue, 17 Jul 2007 23:43:02 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] List.cons and "::" Date: Tue, 17 Jul 2007 23:33:40 +0100 User-Agent: KMail/1.9.7 References: <469D2055.5080408@gnu.org> In-Reply-To: <469D2055.5080408@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707172333.40589.jon@ffconsultancy.com> X-Miltered: at discorde with ID 469D45F6.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 infix:01 val:01 ocaml:01 ocaml:01 frog:98 wrote:01 rec:01 caml-list:01 constructor:01 int:01 let:03 cons:04 cons:04 function:08 On Tuesday 17 July 2007 21:02:29 Sam Steingold wrote: > Why is :: a syntax, not an infix version of List.cons List.cons would be a function whereas :: is a type constructor for the 'a list type: # type 'a list = :: of 'a * 'a list;; type 'a list = :: of 'a * 'a list # let rec list = 1 :: list;; val list : int list = :: (1, ... -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e