From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA02449 for caml-redistribution; Thu, 21 Jan 1999 19:27:46 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA30971 for ; Thu, 21 Jan 1999 17:13:55 +0100 (MET) Received: from pernand.inria.fr (pernand.inria.fr [128.93.8.58]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id RAA28954; Thu, 21 Jan 1999 17:13:53 +0100 (MET) Received: from localhost (furuse@localhost) by pernand.inria.fr (8.6.10/8.6.6) with SMTP id RAA16052; Thu, 21 Jan 1999 17:13:53 +0100 Message-Id: <199901211613.RAA16052@pernand.inria.fr> X-Authentication-Warning: pernand.inria.fr: Host localhost didn't use HELO protocol To: caml-list@inria.fr Cc: Eduardo Gimenez In-reply-to: Your message of Thu, 21 Jan 1999 15:42:20 +0100. <199901211442.PAA19110@pauillac.inria.fr> From: "Jun P. Furuse" Date: Thu, 21 Jan 1999 17:13:52 +0100 Sender: weis > Which is the "prefix" name in Ocaml for the multiplication on > integers? The symbols (+), (/), etc. work fine for the other > arithmetic operations, but the symbol (*) does not. You need a small trick. Try ( * ) or ( *). > Similarly, is there any prefix name for the list constructor (a::l) ? > I am thinking in something like (::) .... :: is not an infix operator, but an infix constructor. It is handled specially by the parser. Like the other normal constructors, you always need its arguments i.e.: # type 'a option = None | Some of 'a # Some;; The constructor Some expects 1 argument(s), but is here applied to 0 argument(s) # fun x -> Some x;; - : 'a -> 'a option = The constructor names themselves are not functions in O'Caml. ----------------------------------------------------------------------- Jun P. Furuse Jun.Furuse@inria.fr INRIA Institut National de Recherche en Informatique et en Automatique